New Return Order form name?
-
24-06-2021 - |
Question
I'm having difficulty finding the name of the new return order form in AX? When I go to setup I see the form name is: SalesCreateOrder
but this is also the name of the form used when I create a new sales order, yet these forms are different so how do they use the same form? The reason being I want to set my DlvMode
to mandatory for Sales Orders but not Return Orders. Is this possible?
Solution
Many forms in Dynamics AX are used for many purposes because of the similarity of the design for more than one function. SalesCreateOrder
is one of these forms.
Forms often change their design and functionality based on parameters passed in through the Args
class that define where the form was called from. These parameters are often set on the menu item through which the user accesses the form.
The caller parameter is typically used in one or more classes that the form uses. One such class for SalesCreateOrder
is a class called SalesCreateOrderForm
. If you look at the construct
method of this class, you will see that it constructs differently based on the salesType
parameter. If the sales type is a return order, it will construct differently than if it were a sales order.
If I were you, I would check the classes declared in the classDeclaration
of SalesCreateOrder
and start looking around in there for a good place to put your code.