Hey guys, I am back with a Microsoft Dynamics 365 (D365) for Finance and Operations blog. In D365 to overcome over layering Microsoft introduced Extensions. So that’s what my blog will be about.
Lets start with class extension. So what do you do if you need to add a new method to a standard class? Well we create class extension. For this example we will create an extension of the class “SalesConfirmDP” and add a new method to this class. To do so first create a new class in you VS project like you normally do:
Lets start with class extension. So what do you do if you need to add a new method to a standard class? Well we create class extension. For this example we will create an extension of the class “SalesConfirmDP” and add a new method to this class. To do so first create a new class in you VS project like you normally do:
Add the final key word and the annotation [ExtensionOf(“ClassName”))]:
Now add your new method to this class:
This is how you add new methods to the class.
Now you can also extend forms
To do that right click on the form you want to extend in the AOT and select “Create extension”
Now you can also extend forms
To do that right click on the form you want to extend in the AOT and select “Create extension”
A new extension form will be added to your project. Right click and select “Open”
Now you can add custom controls to your new form
Customizing reports is also a little different in D365 for Finance and Operations. Now what you do is duplicate the report. We take the example of “PurchRanking”. Right click on the AOT and select “Duplicate in project”
Make your customization to the report and deploy
This report is attached to a menu item, so we will have to extend the menu item and attach is to our new duplicate report. Right click the menu item and select “Create extension”
Set the menu item property “Object” to your new report:
Now run the report and you will see your new custom design.
That’s all for this blog guys. I will be back with more.
Tidak ada komentar:
Posting Komentar