Registering database triggers

Before you use database triggers, you must register each trigger for use with the runtime engine. The Trigger_RegisterDatabase() function handles the registration process for database triggers, typically within a startup procedure.

Example 1: Registering a database trigger

This example registers a database trigger that is activated when a customer record is deleted from the RM_Customer_MSTR table.

{Name: Startup}
local integer l_result;

l_result = Trigger_RegisterDatabase(anonymous(table  RM_Customer_MSTR), form RM_Customer_Maintenance, TRIGGER_ON_DB_DELETE, script IG_Delete_Contact_History;
if l_result <> SY_NOERR then
	warning "Database trigger registration failed.";
end if;


Documentation Feedback