I had a weird customization in the recent days and I wanted to share it with you guys. It is in AX 2012.
Our functional team wanted to add a column in the purchLine(Table) form and it should reflect in the InventTrans(Table) form.
Note: To see the Invent Transactions form, Open PurchLine form > Inventory > View > Transactions.
Let me tell you in steps to get the things done.
Step 1: Add a column of a datatype of your interest into the PurchLine Table and InventTrans Table.
Step 2: Open InventMovement class and add a new column for the above field to update it to InventTrans Table when a PurchLine is created and it should return an empty value. Check ProjId method for your reference.
Step 3: Perform a Forward compilation to make the child classes of the InventMovement class to know about the above method.
Step 4: Override the above method in InventMov_Purch class and return PurchLine.yourfield.
Step 5: Finally, In the classes \Classes\InventMovement\initInventTransFromBuffer do the assignment. Eg: InventTrans.yourField = this.createdmethod(); (look at projId implementation)
Step 6: Compile the class InventMovement and done.
Now, the newly created field of the PurchLine should reflect in InventTrans form.
Leave the comments if you get any queries while performing it.
http://dynamicsuser.net/ax/f/11/t/75821
Our functional team wanted to add a column in the purchLine(Table) form and it should reflect in the InventTrans(Table) form.
Note: To see the Invent Transactions form, Open PurchLine form > Inventory > View > Transactions.
Let me tell you in steps to get the things done.
Step 1: Add a column of a datatype of your interest into the PurchLine Table and InventTrans Table.
Step 2: Open InventMovement class and add a new column for the above field to update it to InventTrans Table when a PurchLine is created and it should return an empty value. Check ProjId method for your reference.
Step 3: Perform a Forward compilation to make the child classes of the InventMovement class to know about the above method.
Step 4: Override the above method in InventMov_Purch class and return PurchLine.yourfield.
Step 5: Finally, In the classes \Classes\InventMovement\initInventTransFromBuffer do the assignment. Eg: InventTrans.yourField = this.createdmethod(); (look at projId implementation)
Step 6: Compile the class InventMovement and done.
Now, the newly created field of the PurchLine should reflect in InventTrans form.
Leave the comments if you get any queries while performing it.
http://dynamicsuser.net/ax/f/11/t/75821
No comments:
Post a Comment