ValidationRuleGroup__mdt
Sobject
global class ValidationRuleGroup__mdt extends SObjectExtends: SObject
Groups validation rules for a specific object and trigger context. Binds to a TriggerSetting and defines when validation rules in this group should execute (timing and operations). Enables application/domain segmentation of validation logic.
Fields
| Field | Description |
|---|---|
| global Boolean BypassExecution__c | When checked, ALL validation rules in this group are completely skipped during trigger execution. |
| global Id BypassFeatureFlag__c | Optional. |
| global FeatureFlag__mdt BypassFeatureFlag__r | Optional. |
| global String ContextClassName__c | Specifies the default Apex class providing context for formula evaluation for all rules in this group. |
| global String Description__c | Brief description of what this validation rule group validates. |
| global String ExecutionStrategy__c | Controls how validation rules execute within this group. |
| global Id RequiredFeatureFlag__c | Optional. |
| global FeatureFlag__mdt RequiredFeatureFlag__r | Optional. |
| global String TriggerOperations__c | Semicolon-separated list of DML operations when rules in this group should run. |
| global Id TriggerSetting__c | Links this validation rule group to a specific object via TriggerSetting. |
| global TriggerSetting__mdt TriggerSetting__r | Links this validation rule group to a specific object via TriggerSetting. |
| global String TriggerTiming__c | Semicolon-separated list of when rules in this group should run. |
| global List ValidationRules__r | Reciprocal relationship for ValidationRule__mdt.ValidationRuleGroup__c. |
Field Details
BypassExecution__c
global Boolean BypassExecution__cWhen checked, ALL validation rules in this group are completely skipped during trigger execution. This is a group-level kill switch that overrides individual rule settings. Applies unconditionally to all users.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | false |
BypassFeatureFlag__c
global Id BypassFeatureFlag__cOptional. All validation rules in this group are 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. All validation rules in this group are SKIPPED when the Feature Flag is enabled.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | false |
| Unique | false |
ContextClassName__c
global String ContextClassName__cSpecifies the default Apex class providing context for formula evaluation for all rules in this group. For standard objects (Account, Contact, Lead, Opportunity, Case, Campaign, Task, Event, User), leave blank to use built-in context classes. Can be overridden at the individual rule level.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(100) |
| Required | false |
| Unique | false |
| External ID | false |
Description__c
global String Description__cBrief description of what this validation rule group validates. Documents the business purpose and scope.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Long Text Area(32768) |
ExecutionStrategy__c
global String ExecutionStrategy__cControls how validation rules execute within this group. Accumulate (default): Run all rules and collect all errors. Fail Fast: Stop processing remaining rules for a record after the first error is found.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Picklist |
| Required | false |
| Default Value | 'Accumulate' |
Picklist Values:
| API Name | Label | Active |
|---|---|---|
Accumulate | Accumulate | Yes |
Fail Fast | Fail Fast | No |
RequiredFeatureFlag__c
global Id RequiredFeatureFlag__cOptional. All validation rules in this group ONLY RUN 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. All validation rules in this group ONLY RUN when the Feature Flag is enabled.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | false |
| Unique | false |
TriggerOperations__c
global String TriggerOperations__cSemicolon-separated list of DML operations when rules in this group should run. Valid values: Insert, Update, Delete, Undelete. Combined with Trigger Timing to determine exact trigger contexts (e.g., Before + Insert = BEFORE_INSERT).
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(100) |
| Required | true |
| Unique | false |
| External ID | false |
TriggerSetting__c
global Id TriggerSetting__cLinks this validation rule group to a specific object via TriggerSetting. All rules in this group will validate records of the object defined in the TriggerSetting.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | TriggerSetting__mdt |
| Required | true |
| Unique | false |
TriggerSetting__r
global TriggerSetting__mdt TriggerSetting__rLinks this validation rule group to a specific object via TriggerSetting. All rules in this group will validate records of the object defined in the TriggerSetting.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | TriggerSetting__mdt |
| Required | true |
| Unique | false |
TriggerTiming__c
global String TriggerTiming__cSemicolon-separated list of when rules in this group should run. Valid values: Before, After. Combined with Trigger Operations to determine exact trigger contexts.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(20) |
| Required | true |
| Unique | false |
| External ID | false |
ValidationRules__r
global List<ValidationRule__mdt> ValidationRules__rReciprocal relationship for ValidationRule__mdt.ValidationRuleGroup__c .