Customizing a Sales Order is one of the most frequent tasks in any Dynamics AX Implementation.
Form SalesTable is anyways a heavily customized form and writing any direct code on it (or for that matter on any form) is not advised.
So what could you do? Well that depends on what you want to do? :)
Writing code on a table or a class is what is best practice. In case of Sales Order form, code could be written on either SalesTable/SalesLine tables or SalesTableType/SalesLineType classes. But then there is only so much you can achieve writing code in the above two places.
In a recent interaction with Mr Lars Jacobsen from Norway, I discovered another way.
There is another class called SalesTableForm Class, which is recommended for writing code that affects your Sales Order form, header as well as lines.
For eg, if you need to dynamically create a new sales line when you satisfy some condition, you can write your code in the method SalesLine_write(). Do explore the class to figure it out more.
No comments:
Post a Comment