Command focus triggers

You can create triggers for commands that have the type Script. You cannot register triggers for built-in commands or those with outher command types. The following table explains each command focus event, and the corresponding value of the focus_type parameter required in the Trigger_RegisterFocus() function:

[spacer]

Focus event

Description

Value of focus_type

change

Occurs whenever the command is executed

TRIGGER_FOCUS_CHANGE


Example 10: Command focus trigger

This trigger is activated before the command Backup Company is executed.

{Name: Startup}
local integer l_result;

l_result = Trigger_RegisterFocus(anonymous(command 'Backup Company’ of form Command_System), TRIGGER_FOCUS_CHANGE, TRIGGER_AFTER_ORIGINAL, script IG_Backup);
if l_result <> SY_NOERR then
	warning "Trigger registration failed.";
end if;


Documentation Feedback