Method calling sequence of table in D365 F&O
Table of Content:
Method calling sequence of table in D365 F&O
When we press CTR+N or create a new record by clicking on new button.
inItValue()
When you change data in a Field
validateFieldValue() -> validateField() -> ModifiedFieldValue() -> ModifiedField()
When you close the table after entering some data
validateWrite() - > aosValidateInsert() -> Insert()
When you open the table which will contain some data
If table will contain 10 records this method is called 10 times aosValidateRead()
When you Save the Record for the first time
validateWrite() -> aosValidateInsert() - > Insert()
When you modify the record and saving
validateFieldValue() -> validateField() -> ModifiedFieldValue() -> ModifiedField()
validateWrite() ->aosValidateUpdate() - > update()
When you delete the record
validateDelete() -> (Select Yes No) -> aosValidateDelete() -> delete()
Write below code in a table then you can easily verify.
public class EmployeeTable extends common { public void modifiedField(FieldId _fieldId){ super(_fieldId); info("modifiedField method called."); } /// /// /// /// ///public boolean validateField(FieldId _fieldIdToCheck) { boolean ret; ret = super(_fieldIdToCheck); info("validateField method called."); return ret; } /// /// /// public void insert() { super(); info("insert method called."); } ////// /// public void delete() { super(); info("delete method called."); } ////// /// public void update() { super(); info("update method called."); } ////// /// ///public str caption() { str ret; ret = super(); info("caption method called."); return ret; } /// /// /// ///public boolean aosValidateDelete() { boolean ret; ret = super(); info("aosValidateDelete method called."); return ret; } /// /// /// ///public boolean aosValidateInsert() { boolean ret; ret = super(); info("aosValidateInsert method called."); return ret; } /// /// /// ///public boolean aosValidateRead() { boolean ret; ret = super(); info("aosValidateRead method called."); return ret; } /// /// /// ///public boolean aosValidateUpdate() { boolean ret; ret = super(); info("aosValidateUpdate method called."); return ret; } /// /// /// public void initValue() { super(); info("initValue method called."); } ////// /// public void write() { super(); info("initValue method called."); } ////// /// ///public boolean validateWrite() { boolean ret; ret = super(); info("validateWrite method called."); return ret; } /// /// /// ///public boolean validateDelete() { boolean ret; ret = super(); info("validateDelete method called."); return ret; } /// /// /// /// /// ///public boolean validateFieldValue(FieldName _fieldName, int _arrayIndex = 1) { boolean ret; ret = super(_fieldName, _arrayIndex); info("validateFieldValue method called."); return ret; } /// /// /// /// /// public void modifiedFieldValue(FieldName _fieldName, int _arrayIndex = 1) { super(_fieldName, _arrayIndex); info("modifiedFieldValue method called."); } ////// /// /// public void merge(Common _mergeInto) { super(_mergeInto); info("merge method called."); } ////// /// public void clear() { super(); info("clear method called."); } }