Posts

How to customize electronic reporting in D365

Image
1. Overview This  Article  provides an overview of how to customize electronic reporting (ER) from scratch. 2. Basic customize.      2.1 Custom reporting configurations  Overview configurations Data Model Data Mapping configurations Format      2.2 Data Contract Extends ERFormatMappingRunBaseContract Specifies the data contract that should be used to run the configured ER format.      2.3 UI builder class Extends SysOperationAutomaticUIBuilder The provided code looks up only ER formats that contain a data source of the Data model type that refers to the data model by using the Root definition. Notes: ERCustomerModel = name of the data model. ERCustomerDataContainer = name of definition in Model to data source mapping (in image 2)      2.4 Data provider class           Used to run the configured ER format.      2.5 Report service class Extends SysOperationServiceBase Calls an ER format, identifies it by a format mapping ID, and provides a data contract as a parameter. Notes:            

Build HTML and send email in D365 FO with X++

Image
1. Generate HTML  Note: If you want to add an attribute to a tag, you must follow the below rule: Use addAttribute before Next use renderBeginTag Exp: htmlTxtWriter.addAttribute("colspan", "9"); htmlTxtWriter.renderBeginTag('th'); htmlTxtWriter.renderEndTag();   Result: <th colspan = 9>   public void runNotificationExPicking() {              Query q;          QueryRun qRun;              QueryBuildDataSource qbds,qbdsProdJournalBOM;             QueryBuildRange               qbr,qbrJournalName,qbrJournalJournal;              InventTable            inventTable;              ProdTable                prodTable;      ProdJournalBOM       prodJournalBOM;      ProdJournalTable      prodJournalTable, prodJournalTableGroup, prodJournalTableNotifyLocal;      JournalId                     journalId;      TransDate                    currentDate;              int                                      i