Thursday 22 February 2018

Using Delegates in AX7 / D365

Delegate methods serve as a means for defining a contract between the delegate instance and the delegate handler. They are widely used by Microsoft to create customization points for customers and partners. It can be very helpful when we want to call something from Model-A in Model-B but we cannot due to referencing. So in this scenario we can use delegates for accessing the artifacts.

Step: 1
Create a delegate method.

Step: 2
Create a subscriber to your delegate method.







Step: 3

Invoke your delegate.










Reference: 
AX 7. Breaking dependencies

No comments:

Post a Comment

How to Get Customer Free Text Invoice "Totals" form field value with X++ in D365FO

Customer free text invoices are an essential aspect of financial management in D365FO. In this blog, I have compiled all the code needed to ...