Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

Action.DescribeResult Class

Contains methods to get metadata about invocable actions.

Namespace

Invocable

Example

1Invocable.Action action = Invocable.Action.createStandardAction('otherActionName');
2List<Invocable.Action.DescribeResult> results = action.getDescribe();
3
4for (Invocable.Action.DescribeResult result : results) {
5    for (Invocable.Action.InputParameter input : result.getInputs()) {
6        List<Invocable.Action.AdditionalAttribute> attrs = input.getAdditionalAttributes();
7        if (attrs != null) {
8            for (Invocable.Action.AdditionalAttribute attr : attrs) {
9                System.debug('Attribute: ' + attr.getName());
10                System.debug('Data Type: ' + attr.getDataType());
11
12                // Handle collection vs single value
13                if (attr.getIsCollection()) {
14                    if (attr.getDataType() == 'STRING') {
15                        List<String> stringValues = attr.getValueAsStringList();
16                        System.debug('String Values: ' + stringValues);
17                    }
18                } else {
19                    System.debug('Value: ' + attr.getValue());
20                }
21            }
22        }
23    }
24}
25

Action.DescribeResult Methods

The following are methods for Action.DescribeResult.

getAction()

Gets the invocable action that was invoked and caused a result to be returned.

Signature

public Invocable.Action getAction()

Return Value

Type: Invocable.Action

getAllowsTransactionControl()

Indicates whether the invocable action allows transaction control.

Signature

public Boolean getAllowsTransactionControl()

Return Value

Type: Boolean

This method returns true if the invocable action allows transaction control.

getCapabilityTypes()

Gets the capability types supported by an invocable action.

Signature

public List<String> getCapabilityTypes()

Return Value

Type: List<String>

List of capability type identifiers of the invocable action.

getCategory()

Gets the category of an invocable action.

Signature

public String getCategory()

Return Value

Type: String

Category of the invocable action.

getConfigurationEditor()

Gets the type of an invocable action.

Signature

public String getConfigurationEditor()

Return Value

Type: String

Configuration editor identifier of the invocable action.

getDescription()

Gets the description of an invocable action.

Signature

public String getDescription()

Return Value

Type: String

Description of the invocable action.

getGenericTypes()

Gets a list of the generic types defined for an invocable action.

Signature

public List<Invocable.Action.GenericType> getGenericTypes()

Return Value

Type: List<Invocable.Action.GenericType>

getHasCallout()

Indicates whether an invocable action makes external callouts.

Signature

public Boolean getHasCallout()

Return Value

Type: Boolean

This method returns true if the invocable action makes external callouts.

getHasSystemGeneratedOutput()

Indicates whether an invocable action is a standard invocable action.

Signature

public Boolean getHasSystemGeneratedOutput()

Return Value

Type: Boolean

This method returns true if the invocable action has system-generated output.

getIconId()

Gets the icon ID for an invocable action.

Signature

public String getIconId()

Return Value

Type: String

Icon ID of the invocable action.

getIconName()

Gets the icon name for an invocable action.

Signature

public String getIconName()

Return Value

Type: String

Icon name for the invocable action.

getInputs()

Gets a list of input parameters for an invocable action.

Signature

public List<Invocable.Action.InputParameter> getInputs()

getLabel()

Gets the type of an invocable action.

Signature

public String getLabel()

Return Value

Type: String

Label of the invocable action.

getMethodDescription()

Gets the description of an invocable action method.

Signature

public String getMethodDescription()

Return Value

Type: String

Describe of the invocable action method.

getMethodLabel()

Gets the label of an invocable action method.

Signature

public String getMethodLabel()

Return Value

Type: String

Label of the invocable action method.

getMethodName()

Gets the name of an invocable action method.

Signature

public String getMethodName()

Return Value

Type: String

Name of the invocable action method.

getName()

Gets the name of an invocable action.

Signature

public String getName()

Return Value

Type: String

Name of the invocable action.

getOutputs()

Gets a list of output parameters for an invocable action.

Signature

public List<Invocable.Action.OutputParameter> getOutputs()

getTargetEntityName()

Gets the target entity name for an invocable action.

Signature

public String getTargetEntityName()

Return Value

Type: String

Target entity name of the invocable action.

getType()

Gets the type of an invocable action.

Signature

public String getType()

Return Value

Type: String

Type of the invocable action.