To Add an Event Handler for a Field

You can add an event handler for an original or custom field on the graph and DAC levels. The following sections provide detailed information:

To Add an Event Handler for a Field on the Graph Level

To add an event handler for a field control used on a single form, perform the following actions:

  1. Open the form in the browser and make the control visible on the form.
  2. On the form title bar, click Customization > Inspect Element to launch the Element Inspector.
    Note: If you need to activate the Element Inspector for a pop-up panel, a dialog box, or another UI element that opens in modal mode and makes the Customization Menu unavailable for selection, you can press Control-Alt.
  3. On the form, click the control for which you are adding an event handler to open the Element Properties Dialog Box for the control.
  4. In the dialog box, click Customize.
  5. If there is no currently selected customization project and the inspector opens the Select Customization Project Dialog Box, select an existing customization project or create a new one.

    If the customization project does not contain a changeset for the form, the Customization Project Editor adds a Page item for the form to the project to keep the changeset to ASPX code of the form in the database. The container of the control is opened in the Screen Editor, and the control is selected in the Control Tree of the editor.

  6. If you need to provide additional business logic to process a control value immediately after the value is changed, follow the instructions described in To Add an Event Handler. If you need to override the existing business logic for the field, follow the instructions described in To Override an Event Handler.

To Add an Event Handler for a Field on the DAC Level

Typically, you develop an event handler to provide the business logic for a field on the graph level. However if you need to add the same business logic for a field used on multiple forms, you add the event handler on the DAC level as follow:

  1. Create a custom attribute, as described in Custom Attributes.
  2. Add the needed event handler to the custom attribute.
  3. Add the custom attribute to the field, as described in To Customize a Field on the DAC Level.