Monday 17 July 2023

Chain of Command

 

Chain of Command

Add a new class in project, Add access modifier as final to class.

Add attribute to class [ExtensionOf(classStr(InventTable))]

We can change attribute for Tables, Forms, Queries etc ... For table - TableStr, Form - FormStr


Add method same as in base class, with same method signature.

Next keyword is used to call base class.

 

[ExtensionOf(classStr(PdmEcoResProductReleaseManager))]

final class ATTPdmEcoResProductReleaseManager_Extension

{

    protected void createInventTable()

    {

        InventTable inventTable;

        next createInventTable();

        if (mEngineeringInventTable)

        {

            ttsbegin;

            inventTable = InventTable::find(ecoResProduct.productNumber(), true);

            if (inventTable)

            {

                inventTable.initFromEngineeringInventTable(mEngineeringInventTable);

                inventTable.doupdate();

            }

            ttscommit;

        }        

    }

}

No comments:

Post a Comment

Data Entities in D365 FnO

  Data management - Data entities ·        Data entity is a conceptual abstraction and encapsulation of one of more underlying tables. ...