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.
Right click on the event and choose “Copy Event Handler method”.
Add a new class from the solution explorer and paste the contents inside the braces of class declaration.
To make it simple, we shall print an info that the field has been modified.
Final step is to build the solution, and run the form.
When the field is modified, an infolog pops up below the action pane.