web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Technique to use Pre-Event Handler functionality for Protected Method in AX7 / D365

dasdasd Profile Picture dasdasd 841
During my development I have to run a block of code before calling of method in a class. So when I tried to create a Pre-Event handler of the method it throws an error because of Protected access modifier of the method. 

So what I have done to achieve this is that I have created an extension of a class and copied the protected method and defined my code block after that, then I have simply called the base method by using next keyword. By doing this I have given my own Pre-Event handler implementation without using any event handler as shown in below images.







This was originally posted here.

Comments

*This post is locked for comments