Posts

Showing posts from May, 2019

Override standard report with custom report in India GST taxes Invoice report in D365FO:

Image
Override standard report with custom report in India GST taxes Invoice report in D365FO: We came across the scenario where we have to skip the standard Report and call our customized Report: ·          Standard GST reportName is set in the setReportName() method. And it is a private method, so can’t be overridden in COC. ·          We had handled it by storing Boolean flag in the Global Cache and skip the setReportMethod() execution by returning false in the   [ PostHandlerFor ( classStr ( SysCountryRegionCode ), staticMethodStr ( SysCountryRegionCode , isLegalEntityInCountryRegion))] method. ·          Custom reportName is set in outputReport() method in the extension class HSOSalesInvoiceController_IN_Extension. [ ExtensionOf ( classStr ( SalesInvoiceController ))] final class HSOSalesInvoiceController_IN_Extension {     protected void outputReport()     {         boolean skipReportNameINMethod;                 #ISOCountryRegionCodes         if (

Identifying the Database Synchronization Issue in D 365 FO

Image
Identifying the Database Synchronization Issue in D365FO I came across a scenario where I was able to build the environment (Did full build of the environment i.e all the models) but was getting the synchronization error everytime. You can refer to the below screenshot for error list. Error List: (1) System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation,---> System.InvalidOperationException: An exception was encountered while initializing chain of command initializer,see event viewer for the detailed information. (2) Syncengine.exe exited with code -1. Solution to recreate the issue : After doing the full build of the environment also I was getting the synchronization issue. So to identify this error I checked into the event viewer. In event viewer I followed the following steps to come across the issue. Step(1) Open the event viewer and right click and run as  administrator. In the event viewer go to the Microsoft folder

Handling the variable declared as private in D 365 through reflection

Image
Error Faced: The BankPositivePayTable is private and cannot be handled in the method send file to destination. The Requrement was to handle BankPositivePayTable variable declared  as private in the method of same class. So we used Reflection to handle this variable declared as Private. Below is the attached code on how we tackle the scenario. public class BankPositivePayExport extends RunBase {     private BankAccountID bankAccountId;     private BankAccountTable bankAccountTable;     private AllSelected companySelection;     private AllSelected bankSelection;     private DataAreaId dataAreaId;     private TransDate cutOffDate;     private BankPositivePayFormatName payFormat;     private DialogField dialogPayFormat;     private DialogField dialogBank;     private DialogField dialogCompany;     private DialogField dialogcutOffDate;     private DialogField dialogSelectedBank;     private DialogField dialogSelectedCompany;     protected SysQueryRun queryRun;  

Process to add fields in the Data Entity and Updating the methods in Data Entity Property

Image
Process to add fields in the Data Entity and Updating the methods in Data Entity Property: We can create a new data entity by duplicating the standard data entity or you can create the   extension of the standard Data Entity. Please find the below example: Step(1) Duplicate the standard Data Entity SalesOpenSalesPriceJournalLineEntity. Say Test_SalesOpenSalesPriceJournalLineEntity and regenerate the   staging table. Add a new field   say Test_ItemPriceGroupCode. Step(2) Go to the property of the field-Test_ItemPriceGroupCode and add the new method say Test_SalesOpenSalesPriceJournalLineEntiy_Extension in the Data Entity View Method as   Test_SalesOpenSalesPriceJournalLineEntiy_Extension::ItemPriceGroupCode. Thanks Dynamics 365 Learner