ERP Core API Developer Reference

fferpcore.FeatureConsoleService

global with sharing class FeatureConsoleService

Retrieve and activate Feature Console features and steps.

Methods

readFeatures

global static List<fferpcore.FeatureConsoleService.Feature> readFeatures()

Reads all available features from the database and whether or not they are enabled.

Return Value

The list of all features

readFeatureSteps

global static List<fferpcore.FeatureConsoleService.Step> readFeatureSteps(Set<String> qualifiedFeatureNames)

Reads all feature steps from the database for a given set of features and whether or not they have been marked as completed.

Input Parameters

Name Type Description
qualifiedFeatureNames Set<String> The qualified API names of the features to read steps for.

Return Value

The list of all feature steps for the given features.

enable

global static fferpcore.FeatureConsoleService.ActivationResponse enable(Id recordId)

Marks a given feature or feature step as enabled or completed.

Input Parameters

Name Type Description
recordId Id The ID of the custom metadata record representing the feature or step to enable.

Return Value

Whether the enable request was successful and if not any errors encountered.

disable

global static fferpcore.FeatureConsoleService.ActivationResponse disable(Id recordId)

Marks a given feature or feature step as disabled or not completed.

Input Parameters

Name Type Description
recordId Id The ID of the custom metadata record representing the feature or step to disable.

Return Value

Whether the disable request was successful and if not any errors encountered.

isFeatureEnabled

global static Map<String, Boolean> isFeatureEnabled(Set<String> qualifiedFeatureNames)

Determines whether a given set of features have been enabled.

Input Parameters

Name Type Description
qualifiedFeatureNames Set<String> The qualified API names of the features to check.

Return Value

A map of the qualified API names of the passed in features against whether they are enabled.

fferpcore.FeatureConsoleService.Feature

global class Feature

Wrapper for a Feature Console feature and whether it has been enabled.

Properties

Name Type Description
Record FeatureConsoleFeature__mdt The custom metadata object representing the feature.
IsActive Boolean Whether the feature has been enabled.

Methods

Feature

global Feature()

getCanToggle

global Boolean getCanToggle()

Whether the option to toggle the status of this feature should be available.

Return Value

True if you should be able toggle this feature.

fferpcore.FeatureConsoleService.Step

global class Step

Wrapper for a Feature Console feature step and whether it has been marked as completed.

Properties

Name Type Description
Record FeatureConsoleFeatureStep__mdt The custom metadata object representing the feature step.
IsActive Boolean Whether the feature step has been marked as completed.

Methods

Step

global Step()

fferpcore.FeatureConsoleService.ActivationResponse

global class ActivationResponse

Response returned when enabling or disabling a step or feature.

Properties

Name Type Description
Success Boolean Whether the feature or step was successfully enabled or disabled.
Messages List<String> A list of the errors if the request was not successful.

Methods

ActivationResponse

global ActivationResponse()