0

In Dynamics AX 2012, when trying to update the value of the field DlvMode or adding a new delivery address in the sales order (through the Header view), I keep getting this error:

Function SalesTable2LineField.lineUpdateDescription has been used incorrectly

There's no customization in this method or this class.

Jan B. Kjeldsen
  • 17,817
  • 5
  • 32
  • 50
  • Are you sure you are not passing an unsupported fieldId to this method? Even though the method itself is not custom, it could be called by custom code. Are you able to share the call stack with us? – rjv Jan 06 '20 at 13:21

1 Answers1

5

This is something that could be debugged in 15 minutes if you had a developer. My guess would be that you are using one of these country codes:

  1. AT,BE,CZ,DK,EE,FI,FR,DE,HU,IE,IT,LV,LT,NL,PL,ES,SE,GB,RU,MY (SalesTable_W)
  2. BR (SalesTable_BR)
  3. IN (SalesTable_IN)

In \Classes\SalesTable2LineField\lineUpdateDescription at the very end, immediately above the throw error... line add this:

info(strFmt("Offending table is %1 (%2)", tableId2name(tableId), tableId));

You should also add a breakpoint if that alone doesn't help and figure it out.

Then repeat the operation, and you will know the table. It's possible it's just a Microsoft bug or if \Forms\SalesTable has been modified, it could be that. You just need to debug it.

enter image description here

Alex Kwitny
  • 11,211
  • 2
  • 49
  • 71