When saving records in a form in Dynamics AX a lot of methods are fired off both on the form as well as on the table itself. I haven’t found another flow diagram describing what methods are fired and in what order, so I tested and found the results displayed in the diagram to the left:
- Form’s Validate() method on the datasource is called
- When super() is called with in the validate() method, the table’s validateField() method is called for each field
- Code placed after the super() in the form’s validate method is called
- Form’s validateWrite() method on the datasource is called
- When the super() is called in the validateWrite() method, the table’s validateWrite() method is called
- Code placed after the super() in the form’s validateWrite() method is called
- Form’s write() method is called.
- When the super() is called in the write() method, the table’s insert() method is called.
- Code placed after the super() in the form’s write() method is called.
Comment below if you have corrections or additions to this diagram.
Happy daxing.