What is a Self-Adaptive #Trigger?
A Self-Adaptive #Trigger transforms and validates fields on the triggering records before they're committed to the database. Unlike #Trigger Actions, which operate on related data, a Self-Adaptive #Trigger treats the triggering records as both input and output.
To create a Self-Adaptive #Trigger:
- Create a new Executable enabling #Trigger.
- Set the source and target objects to the same object.
- Choose Update as the action.
- Set both the Target Matching Field and the Mapping to Id — telling the engine that the records being evaluated are the same ones that fired the trigger.
-
For in-memory field transformations, enable
Before Insert and/or Before Update. For
validations, enable any trigger event and use the
ERRORfunction in Field Mappings or Scope Filters to conditionally fail records with custom messages.