...
In order to make use of this new class, we will need to override the default trigger load service in the services.xml file by including the following:
Code Block |
---|
title | Override Default Trigger Load Service |
---|
collapse | true |
---|
|
<ttServiceLoaderRow>
<Order>0</Order>
<ServiceTypeName>Akioma.Swat.Server.Startup.IDatabaseTriggerLoadService</ServiceTypeName>
<ServiceClassName>Custom.CustomDatabaseTriggerLoadService</ServiceClassName>
</ttServiceLoaderRow> |
Load the custom triggers
In the above example, we run loadCustomTriggers.p from the LoadTriggers method. A simple implementation of the procedure will look like this:
Code Block |
---|
title | loadCustomTriggers.p |
---|
collapse | true |
---|
|
{Custom/Triggers/myCreateTrigger.i} //here, we just include the desired triggers |
And inside the trigger itself:
Code Block |
---|
|
ON CREATE OF myTable
DO:
MESSAGE "Created new record".
END.
|