D365 Data entitiy Insert method COC

In this Microsoft Dynamics 365 Finance and Operations blog we will perform some action on inserting of data in data entity using Chain of command

[ExtensionOf(tableStr(SalesOrderHeaderEntity))]
final class LSSalesOrderHeaderEntity_Extension
{

    public void insert()
    {

        next insert();

        if(LSParameters::find().FiscalDocumentSourceText == NoYes::Yes)
        {
            SalesTable      SalesTableLocal;
            SalesTable_BR   SalesTable_BRLocal;
            select firstonly SalesTableLocal
                where SalesTableLocal.SalesId == this.SalesOrderNumber;
            select firstonly SalesTable_BRLocal
                where SalesTable_BRLocal.SalesTable == SalesTableLocal.RecId;
            SalesTable_BR::getFiscalTextDocument(SalesTableLocal, SalesTable_BRLocal.SalesPurchOperationType_BR);
        }

    }

}




You can also check out my previous blog: D365 Edit method

Need help? Connect Atul

Atul Yadav
Latest posts by Atul Yadav (see all)

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Your email address will not be published. Required fields are marked *