Method calling sequence of table in D365 F&O

Rumman Ansari   Software Engineer   2023-09-08   1264 Share
☰ Table of Contents

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.");

    
    }

    /// <summary>
    ///
    /// </summary>
    /// <param name = "_fieldIdToCheck"></param>
    /// <returns></returns>
    public boolean validateField(FieldId _fieldIdToCheck)
    {
        boolean ret;
    
        ret = super(_fieldIdToCheck);
        info("validateField method called.");
        
        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    public void insert()
    {
        super();
        info("insert method called.");
    }

    /// <summary>
    ///
    /// </summary>
    public void delete()
    {
        super();
        info("delete method called.");
    }

    /// <summary>
    ///
    /// </summary>
    public void update()
    {
        super();
        info("update method called.");
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public str caption()
    {
        str ret;
    
        ret = super();
        info("caption method called.");
        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public boolean aosValidateDelete()
    {
        boolean ret;
    
        ret = super();
        info("aosValidateDelete method called.");
        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public boolean aosValidateInsert()
    {
        boolean ret;
    
        ret = super();
        info("aosValidateInsert method called.");
        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public boolean aosValidateRead()
    {
        boolean ret;
    
        ret = super();
        info("aosValidateRead method called.");
        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public boolean aosValidateUpdate()
    {
        boolean ret;
    
        ret = super();

        info("aosValidateUpdate method called.");

        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    public void initValue()
    {
        super();
        info("initValue method called.");
    }

    /// <summary>
    ///
    /// </summary>
    public void write()
    {
        super();
        info("initValue method called.");
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public boolean validateWrite()
    {
        boolean ret;
    
        ret = super();

        info("validateWrite method called.");

        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <returns></returns>
    public boolean validateDelete()
    {
        boolean ret;
    
        ret = super();

        info("validateDelete method called.");

        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <param name = "_fieldName"></param>
    /// <param name = "_arrayIndex"></param>
    /// <returns></returns>
    public boolean validateFieldValue(FieldName _fieldName, int _arrayIndex = 1)
    {
        boolean ret;
    
        ret = super(_fieldName, _arrayIndex);
        info("validateFieldValue method called.");
        return ret;
    }

    /// <summary>
    ///
    /// </summary>
    /// <param name = "_fieldName"></param>
    /// <param name = "_arrayIndex"></param>
    public void modifiedFieldValue(FieldName _fieldName, int _arrayIndex = 1)
    {
        super(_fieldName, _arrayIndex);
        info("modifiedFieldValue method called.");
    }

    /// <summary>
    ///
    /// </summary>
    /// <param name = "_mergeInto"></param>
    public void merge(Common _mergeInto)
    {
        super(_mergeInto);
        info("merge method called.");
    }

    /// <summary>
    ///
    /// </summary>
    public void clear()
    {
        super();
        info("clear method called.");
    }

}