Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

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
titleOverride Default Trigger Load Service
collapsetrue
<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
titleloadCustomTriggers.p
collapsetrue
{Custom/Triggers/myCreateTrigger.i}	//here, we just include the desired triggers


And inside the trigger itself:

Code Block
titlemyCreateTrigger.i
ON CREATE OF myTable
DO:
  MESSAGE "Created new record".
END.