Skip to content

FLOW_CheckFeatureFlag

Class · Group: Feature Flags

apex
global inherited sharing class FLOW_CheckFeatureFlag

This class is used in Flows to check whether a specific feature flag is enabled. It provides a method that can be invoked from a flow to determine if a feature is active for the current user based on the UTIL_FeatureFlag utility.

Since: 1.0

Example:

apex
List<Boolean> results = FLOW_CheckFeatureFlag.isEnabled(new List<String> {'NewDashboard'});
Boolean isEnabled = results[0];

See Also: UTIL_FeatureFlag


Methods

MethodDescription
global static List isEnabled(List<String> flagNames)Returns if the specified feature flag is enabled for the current user.

Method Details

isEnabled

apex
@InvocableMethod(category='Utilities' description='Returns true if the specified Feature Flag is enabled for the current user.' label='Is Feature Flag Enabled') global static List<Boolean> isEnabled(List<String> flagNames)

Returns if the specified feature flag is enabled for the current user.

Parameters:

  • flagNames (List) - A list containing a single DTO_Request with the feature flag's API name.

Returns: Boolean - A list containing whether flags provided are enabled or not

Since: 1.0

Example:

apex
List<Boolean> results = FLOW_CheckFeatureFlag.isEnabled(new List<String>{'NewDashboard', 'BetaFeature'});
if(results[0])
{
	LOG_Builder.build().info('NewDashboard feature is enabled').emitAt('MyFlow.checkFlag');
}