Event Handling – Dynamics 356 operations

There are situations where certain logic needs to be applied prior to or after execution of the few methods. Event handlers can be used for such cases.

In Dynamics 365 operation, we can trigger event handlers for the fields in form datasources or tables.

In this post , I have explained using Form Eventhandlers.

Let us see how an event is triggered when a field is modified in the form.

Navigate to the field in the datasource and select ” OnModified” event.

eh1

Right click on the event and choose “Copy Event Handler  method”.

eh2

Add a new class from the solution explorer and paste the contents inside the braces of class declaration.

eh3

To make it simple, we shall print an info that the field has been modified.

eh4

Final step is to build the solution, and run the form.

When the field is modified, an infolog pops up below the action pane.

eh5

 

Advertisements

About AnithaEswaran

Hello all, Thanks for visiting my blog. I started this blog to share my learning with Ax members . Since I am from technical background, most of my posts would be from X++. Thanks to my mentor and my colleague Romain who guided and helped me in learning many new concepts in Ax. This instilled confidence in me to handle and troubleshoot complex issues. Feedback wrt to my blog entries are most welcome …
This entry was posted in Dynamics 365 Operations - Ax 7.0, Event Handling and tagged . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s