Friday, September 27, 2019

D365 Finance & Operation - Sample customization using ExtensionOf


Sample customization in D365 using Visual Studio, ExtensionOf attribute for beginners.

Note : I used VHD so I'm skipping LCS part.

Step 1: Open Visual studio as Admin

Step 2 : Create model



 
Step 3 : Select "Create new package"

Step 4 : I selected ApplicationPlatform, ApplicationSuite,ApplicationFoundation and Retail packges. You can select whatever you want based on your requirement.

Step 5 : Create new Unified Operations project
                                   

Step 6 : Create new class

                                   


Step 7 : Add following code, I added info log in run() to display the sales order id, by extending SalesTable form and build the project.

[ExtensionOf(formStr(SalesTable))]
final class SalesTable_Extension
{
void run()
    {
        next run();
        info ("Sales Order "+SalesTable.salesId);
    }

}

Step 8 : To test the code, open the F&O and go to Sales order and select any Sales id.



That's it.

Happy Daxing,

Regards,
Arun S. Keerthi



 

1 comment: