Using an event handler

To add an event handler to entity form fields, we can double-click on the particular entity field and click on the Add button under Event List. While associating possible events with controls, we can enable the Pass execution context as first parameter option, as follows: 

Furthermore, in our code, we can use this execution context. We can only use a context such as formContext if this option is selected under the Event tab, but if this option is not enabled and we try to use formContext, we will get an error.