Before you use function triggers, you must register each trigger for use with the runtime engine. The Trigger_RegisterFunction() function handles the registration process for function triggers, typically within a startup procedure.
This example registers a trigger that runs a third-party procedure named IG_Check_Save in response to the Microsoft Dynamics GP form-level function named SaveRecord:
{Name: Startup} local integer l_result; l_result = Trigger_RegisterFunction(function SaveRecord of form CM_Checkbook_Maintenance, TRIGGER_AFTER_ORIGINAL, script IG_Check_Save);
This example registers a trigger that runs a third-party function named IG_Verify_Checkbook in response to the Microsoft Dynamics GP form-level function named SaveRecord:
{Name: Startup} local integer l_result; l_result = Trigger_RegisterFunction(function SaveRecord of form CM_Checkbook_Maintenance, TRIGGER_AFTER_ORIGINAL, function IG_Verify_Checkbook);