MaskingTarget__mdt
Sobject
global class MaskingTarget__mdt extends SObjectExtends: SObject
Applies a Masking Rule to a specific field on a specific object. Each record says "use this rule on this field". Pick the object first, then the Field picklist filters to fields on that object. Create as many records as you need — the same rule can apply to many fields across many objects.
Fields
| Field | Description |
|---|---|
| global String CallerClass__c | Optional. |
| global Id Field__c | The field on the chosen object to mask. |
| global FieldDefinition Field__r | The field on the chosen object to mask. |
| global Boolean IsActive__c | Controls whether this wiring is in effect. |
| global Id Rule__c | The Masking Rule that will be applied to the field. |
| global MaskingRule__mdt Rule__r | The Masking Rule that will be applied to the field. |
| global Id SObjectType__c | The object that contains the field to mask. |
| global EntityDefinition SObjectType__r | The object that contains the field to mask. |
Field Details
CallerClass__c
global String CallerClass__cOptional. Leave blank to apply the rule whenever the field is masked. Set to an Apex class name (e.g. API_SendEmail) to restrict the rule to calls from that class only — useful when you want a rule to apply only in the context of one API service or integration and not everywhere that field is used.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(100) |
| Required | false |
| Unique | false |
| External ID | false |
Field__c
global Id Field__cThe field on the chosen object to mask. Only fields from the selected SObject Type appear in the picklist. Leave blank to apply the rule to every updateable text-shaped field on the object (Text, Text Area, Long Text Area, URL, Email, Phone, Encrypted Text); pick a specific field to scope the rule to one field, or to override or disable the wildcard behavior on that one field.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FieldDefinition |
| Required | false |
| Unique | false |
Field__r
global FieldDefinition Field__rThe field on the chosen object to mask. Only fields from the selected SObject Type appear in the picklist. Leave blank to apply the rule to every updateable text-shaped field on the object (Text, Text Area, Long Text Area, URL, Email, Phone, Encrypted Text); pick a specific field to scope the rule to one field, or to override or disable the wildcard behavior on that one field.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FieldDefinition |
| Required | false |
| Unique | false |
IsActive__c
global Boolean IsActive__cControls whether this wiring is in effect. Uncheck to temporarily disable masking on this specific field without changing the underlying rule.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | true |
Rule__c
global Id Rule__cThe Masking Rule that will be applied to the field. Pick from rules shipped with the package or rules you have created yourself.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | MaskingRule__mdt |
| Required | true |
| Unique | false |
Rule__r
global MaskingRule__mdt Rule__rThe Masking Rule that will be applied to the field. Pick from rules shipped with the package or rules you have created yourself.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | MaskingRule__mdt |
| Required | true |
| Unique | false |
SObjectType__c
global Id SObjectType__cThe object that contains the field to mask. Select first — the Field picklist filters to fields on whatever object you pick here.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | EntityDefinition |
| Required | true |
| Unique | false |
SObjectType__r
global EntityDefinition SObjectType__rThe object that contains the field to mask. Select first — the Field picklist filters to fields on whatever object you pick here.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | EntityDefinition |
| Required | true |
| Unique | false |