Creating application event handlers

In its most basic form, an application event handler consists of these parts:

  • An association with a particular application event
  • A handler sequence number
  • One or more actions to perform when the application event is triggered

Each event handler is uniquely defined in the system by the combination of an event name and a handler sequence number. Both of these are set on the Event Handlers form. Event handlers must have one or more associated event actions.

  1. Open the Event Handlers form and execute Filter-In-Place.
  2. Initiate a new record.
  3. Ata minimum, provide information for these fields and options:
    Event Name
    Select an existing application event or specify a new event name for the handler that you want to define.
    Handler Description
    Specify a description for the handler. This description is helpful when you have multiple handlers with the same event name. This description allows you to find the appropriate handler in a list.
    Sequence
    No action is required. The application assigns this number automatically when you save the new event handler.
    Access As
    Verify that this read-only field is displaying your Access As identifier.
    Active
    To designate this event handler for immediate and active use, select this option.

    When this option is selected, it means that the handler executes whenever the event fires.

    When this option is cleared, the event handler is considered to be inactive, and the handler does not execute when the event fires.

    Can Override
    To allow event handlers created under different Access As identifiers to override this one (using a Keep With selection), select this option.

    Clearing this option prevents other event handlers from overriding this one.

  4. Save the new event handler.
  5. Optionally, to create and assign event actions to be performed when this event handler executes, click Event Actions.
    This launches the Event Actions form. Use that form to create and assign the required event actions. When you save your work on that form and close it, the application returns you to the Event Handlers form. The newly assigned event actions display in sequence in the Event Actions grid.
  6. On the Event Handlers form, set the other options as desired.
    For information about form options, see the context-sensitive online help for each option.
  7. Optionally, to see a graphical (diagrammatic) representation of the event handler and its actions, click Diagram.
    This button opens the Event Handler Diagram form. This form allows you to edit and add event actions to the event handler flow.
  8. Optionally, if you have multiple event handlers for the application event, and you want to change the order in which they execute, click Resequence.
    This launches the Event Handler Sequence form, which you can use to alter the sequence.
  9. Save the event handler.