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
Latest posts by Atul Yadav (see all)
- D365 Data entitiy Insert method COC - October 30, 2024
- D365 Joins - October 16, 2024
- D365 Find method and Exist method - October 9, 2024