TriggerAction__mdt
Sobject
global class TriggerAction__mdt extends SObjectExtends: SObject
Registers a single trigger action: one Apex class bound to one trigger event (e.g. Before Insert) on one object. Controls execution order, entry criteria, recursion, bypass, and performance logging. Each record belongs to a parent Trigger Setting that identifies the object.
Fields
| Field | Description |
|---|---|
| global Boolean AllowNonSelfInitiated__c | Controls whether this action runs during cascading triggers (when a different object's trigger causes this object's trigger to fire). |
| global Boolean AllowRecursion__c | Controls whether this action can execute more than once in the same transaction. |
| global String ApexClassName__c | Fully qualified Apex class name that implements the trigger action logic. |
| global Boolean BypassExecution__c | When checked, this individual trigger action is completely skipped during trigger execution. |
| global Id BypassFeatureFlag__c | Optional. |
| global FeatureFlag__mdt BypassFeatureFlag__r | Optional. |
| global String Description__c | Human-readable explanation of what this trigger action does and why it exists. |
| global String EntryCriteriaContextClassName__c | Apex class that provides context variables (e.g. |
| global String EntryCriteriaFormula__c | Runtime formula expression evaluated per record using the FormulaEval namespace. |
| global String Event__c | The specific trigger event (e.g. |
| global String FailureAction__c | Controls how this trigger action handles unhandled errors raised during dispatch — flow runtime faults for flow actions, uncaught Apex exceptions for Apex actions. |
| global String FlowName__c | API name of the active flow that runs as this trigger action. |
| global Boolean ForcePerformanceLogging__c | When checked, execution time is always logged for this action regardless of whether it exceeds the threshold. |
| global Decimal Order__c | Determines execution sequence relative to other actions on the same object and event. |
| global Decimal PerformanceThresholdMs__c | Action-level performance threshold in milliseconds. |
| global Id RequiredFeatureFlag__c | Optional. |
| global FeatureFlag__mdt RequiredFeatureFlag__r | Optional. |
| global Boolean SuppressPerformanceLogging__c | When checked, performance logging is completely suppressed for this action even if the parent Trigger Setting has logging enabled. |
| global Id TriggerSetting__c | Links this action to its parent Trigger Setting, which identifies the SObject the trigger fires on. |
| global TriggerSetting__mdt TriggerSetting__r | Links this action to its parent Trigger Setting, which identifies the SObject the trigger fires on. |
Field Details
AllowNonSelfInitiated__c
global Boolean AllowNonSelfInitiated__cControls whether this action runs during cascading triggers (when a different object's trigger causes this object's trigger to fire). When false, the action only runs when the trigger is initiated directly by the originating DML. Defaults to true (cascading allowed).
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | true |
AllowRecursion__c
global Boolean AllowRecursion__cControls whether this action can execute more than once in the same transaction. When false, the framework tracks execution and skips the action if the same trigger fires again (e.g. an After Update action that updates the same object). Defaults to true (recursion allowed).
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | true |
ApexClassName__c
global String ApexClassName__cFully qualified Apex class name that implements the trigger action logic. The class must extend TRG_Base and implement the appropriate IF_Trigger interface (e.g. IF_Trigger.BeforeInsert). For managed package classes, include the namespace prefix (e.g. kern.TRG_SetFoobarDefaults). Set this OR Flow Name, never both — deploys that populate both fields or neither are blocked by a validation rule on this object. Leave blank to configure a flow action via Flow Name.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(100) |
| Required | false |
| Unique | false |
| External ID | false |
BypassExecution__c
global Boolean BypassExecution__cWhen checked, this individual trigger action is completely skipped during trigger execution. Unlike permission-based bypasses, this is an unconditional kill switch that applies to all users regardless of permissions or context.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | false |
BypassFeatureFlag__c
global Id BypassFeatureFlag__cOptional. This action is SKIPPED when the Feature Flag is enabled.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | false |
| Unique | false |
BypassFeatureFlag__r
global FeatureFlag__mdt BypassFeatureFlag__rOptional. This action is SKIPPED when the Feature Flag is enabled.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | false |
| Unique | false |
Description__c
global String Description__cHuman-readable explanation of what this trigger action does and why it exists. Required by validation rule to ensure every action is documented for maintainability.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Long Text Area(32768) |
EntryCriteriaContextClassName__c
global String EntryCriteriaContextClassName__cApex class that provides context variables (e.g. newRecord, oldRecord) for entry criteria formula evaluation. Built-in contexts exist for standard objects (Account, Contact, Lead, Opportunity, Case, Campaign, Task, Event, User) and Foobar__c — leave blank for those. Custom objects require a class implementing the formula context interface.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(100) |
| Required | false |
| Unique | false |
| External ID | false |
EntryCriteriaFormula__c
global String EntryCriteriaFormula__cRuntime formula expression evaluated per record using the FormulaEval namespace. When the formula returns true, the action executes for that record; when false, the record is excluded. Supports field references via context variables (e.g. newRecord.Status). Requires a Context Class Name for custom objects.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Long Text Area(32768) |
Event__c
global String Event__cThe specific trigger event (e.g. Before Insert, After Update) this action responds to. Combined with the Trigger Setting lookup, this determines exactly when the Apex class executes during the trigger lifecycle.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Picklist |
| Required | true |
Picklist Values:
| API Name | Label | Active |
|---|---|---|
Before Insert | Before Insert | Yes |
After Insert | After Insert | Yes |
Before Update | Before Update | Yes |
After Update | After Update | Yes |
Before Delete | Before Delete | Yes |
After Delete | After Delete | Yes |
After Undelete | After Undelete | Yes |
FailureAction__c
global String FailureAction__cControls how this trigger action handles unhandled errors raised during dispatch — flow runtime faults for flow actions, uncaught Apex exceptions for Apex actions. Log and Continue (default) records the error in the audit log and lets the save proceed — recommended for non-critical actions like notifications, derived field updates, or supplemental logging. Block DML stops the save and surfaces the action's error message back to the user — recommended for validation-style actions where the trigger should reject records that fail the action's checks. Governor exceptions (CPU limit, SOQL limit, etc.) always propagate regardless of this setting. Defaults to Log and Continue.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Picklist |
| Required | false |
Picklist Values:
| API Name | Label | Active |
|---|---|---|
LogAndContinue | Log and Continue | Yes |
BlockDml | Block DML | No |
FlowName__c
global String FlowName__cAPI name of the active flow that runs as this trigger action. The flow must be an active auto-launched flow that declares an input/output variable named "record" matching the object on this trigger setting, plus an input-only variable named "recordPrior" for update events. Set this OR Apex Class Name, never both — deploys that populate both fields or neither are blocked by a validation rule on this object. Apex Class Name can be left blank when this is set; the framework runs the flow automatically. Deploys are blocked when the named flow is missing or inactive.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(80) |
| Required | false |
| Unique | false |
| External ID | false |
ForcePerformanceLogging__c
global Boolean ForcePerformanceLogging__cWhen checked, execution time is always logged for this action regardless of whether it exceeds the threshold. Overrides both the action-level and object-level threshold settings. Useful for monitoring specific actions during performance investigations.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | false |
Order__c
global Decimal Order__cDetermines execution sequence relative to other actions on the same object and event. Lower numbers execute first. Actions sharing the same order value have no guaranteed sequence. Subscriber-controlled to allow reordering without package upgrades.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Number(4,0) |
| Required | true |
| Unique | false |
| External ID | false |
PerformanceThresholdMs__c
global Decimal PerformanceThresholdMs__cAction-level performance threshold in milliseconds. When set, the action is logged if its execution time exceeds this value. Overrides both the object-level (Trigger Setting) and global thresholds. Leave blank to inherit from the parent Trigger Setting or global default.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Number(8,0) |
| Required | false |
| Unique | false |
| External ID | false |
RequiredFeatureFlag__c
global Id RequiredFeatureFlag__cOptional. This action ONLY RUNS when the Feature Flag is enabled.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | false |
| Unique | false |
RequiredFeatureFlag__r
global FeatureFlag__mdt RequiredFeatureFlag__rOptional. This action ONLY RUNS when the Feature Flag is enabled.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | false |
| Unique | false |
SuppressPerformanceLogging__c
global Boolean SuppressPerformanceLogging__cWhen checked, performance logging is completely suppressed for this action even if the parent Trigger Setting has logging enabled. Use this for lightweight actions where logging overhead is unnecessary. Takes precedence over Force Performance Logging if both are checked.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | false |
TriggerSetting__c
global Id TriggerSetting__cLinks this action to its parent Trigger Setting, which identifies the SObject the trigger fires on. All actions sharing the same Trigger Setting run on the same object and inherit its object-level bypass and performance controls.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | TriggerSetting__mdt |
| Required | true |
| Unique | false |
TriggerSetting__r
global TriggerSetting__mdt TriggerSetting__rLinks this action to its parent Trigger Setting, which identifies the SObject the trigger fires on. All actions sharing the same Trigger Setting run on the same object and inherit its object-level bypass and performance controls.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | TriggerSetting__mdt |
| Required | true |
| Unique | false |