FeatureFlagStrategy__mdt
Sobject
global class FeatureFlagStrategy__mdt extends SObjectExtends: SObject
Defines a single evaluation rule for a parent Feature Flag. A Feature Flag can have multiple strategies, which are processed in the order specified by the 'Order' field. The first strategy to return 'true' enables the feature.
Fields
| Field | Description |
|---|---|
| global String CustomHandler__c | Optional. |
| global String ExpectedValue__c | Optional. |
| global Id FeatureFlag__c | Master-detail relationship to the parent FeatureFlag__mdt record. |
| global FeatureFlag__mdt FeatureFlag__r | Master-detail relationship to the parent FeatureFlag__mdt record. |
| global Boolean IsActive__c | Controls whether this specific strategy is evaluated. |
| global Decimal Order__c | The execution priority for this strategy relative to other strategies for the same Feature Flag. |
| global String Target__c | The identifier, name, or path of the item to evaluate. |
| global String Type__c | The type of evaluation strategy to execute. |
CustomHandler__c
global String CustomHandler__cOptional. The name of an Apex class that implements the framework's feature flag strategy interface. If provided, this class executes instead of the standard logic for the selected Type.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(255) |
| Required | false |
| Unique | false |
| External ID | false |
ExpectedValue__c
global String ExpectedValue__cOptional. The value to compare against the 'Target'. If the 'Target' is a field path, this field is compared (with type-safety) against the value in that field. If this field is blank, the logic defaults to checking if the 'Target' field's value is 'true'.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(255) |
| Required | false |
| Unique | false |
| External ID | false |
FeatureFlag__c
global Id FeatureFlag__cMaster-detail relationship to the parent FeatureFlag__mdt record. This links the strategy rule to the feature it controls.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | true |
| Unique | false |
FeatureFlag__r
global FeatureFlag__mdt FeatureFlag__rMaster-detail relationship to the parent FeatureFlag__mdt record. This links the strategy rule to the feature it controls.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | FeatureFlag__mdt |
| Required | true |
| Unique | false |
IsActive__c
global Boolean IsActive__cControls whether this specific strategy is evaluated. If unchecked (false), this strategy is skipped, and the framework moves to the next strategy based on the 'Order' field.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Checkbox |
| Default Value | false |
Order__c
global Decimal Order__cThe execution priority for this strategy relative to other strategies for the same Feature Flag. Strategies are evaluated in ascending order (e.g., 1, then 2, then 3).
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Number(2,0) |
| Required | false |
| Unique | false |
| External ID | false |
Target__c
global String Target__cThe identifier, name, or path of the item to evaluate. The required format depends on the 'Type' field. For Custom Permission type: unprefixed names check local/subscriber permissions, 'core.' prefix checks package permissions, and 'namespace__' syntax checks fully-qualified namespaced permissions. For Permission Set Group type: the API name of a permission set or the developer name of a permission set group, matched against the user's direct assignments.
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Text(255) |
| Required | false |
| Unique | false |
| External ID | false |
Type__c
global String Type__cThe type of evaluation strategy to execute. Determines which logic path is used and dictates the required format for the Target field. Options: Custom Permission (user has permission), Profile (user's profile matches), Permission Set Group (user is assigned the named permission set or permission set group; only direct assignments match), Public Group (user is member), Hierarchical Custom Setting (field value), List Custom Setting (record field value), Custom Metadata (record field value).
Field Attributes:
| Attribute | Value |
|---|---|
| Data Type | Picklist |
| Required | true |
Picklist Values:
| API Name | Label | Active |
|---|---|---|
Custom Permission | Custom Permission | Yes |
Hierarchical Custom Setting | Hierarchical Custom Setting | No |
Permission Set Group | Permission Set Group | No |
Profile | Profile | No |
Public Group | Public Group | No |
Custom Metadata | Custom Metadata | No |
List Custom Setting | List Custom Setting | No |