Registering focus triggers

Before you use focus triggers, you must register each for use with the runtime engine. The Trigger_RegisterFocus() function handles the registration process for focus triggers, typically within a startup procedure. Refer to the Trigger function library for a complete description of this function.

Example 1: Registering a focus trigger

This example registers a focus trigger used to check required fields in a form when the user clicks the Save button. The procedure run in response to this trigger is IG_Verify_Contact_Save.

{Name: Startup}
local integer l_result;

l_result = Trigger_RegisterFocus(anonymous('Save Button' of window RM_Customer_Maintenance of form RM_Customer_Maintenance), TRIGGER_FOCUS_CHANGE, TRIGGER_BEFORE_ORIGINAL, script IG_Verify_Contact_Save);
if l_result <> SY_NOERR then
	warning "Trigger registration failed.";
end if;


Documentation Feedback