Registering procedure triggers

Before you use procedure triggers, you must first register them for use with the runtime engine. The Trigger_RegisterProcedure() function handles the registration process for a procedure trigger.

Example 1: Registering a procedure trigger

This example registers a procedure trigger that runs when the RM_Delete_Sales_Document procedure is called. When Microsoft Dynamics GP deletes a sales document using this procedure, the trigger processing procedure named IG_Log_Record_Deletes adds a record to an activity tracking table.

{Name: Startup}
local integer l_result;

l_result = Trigger_RegisterProcedure(script RM_Delete_Sales_Document, TRIGGER_AFTER_ORIGINAL, script IG_Log_Record_Deletes);
if l_result <> SY_NOERR then
	warning "Procedure trigger registration failed";
end if;

Documentation Feedback