Action.InputParameter Class

Contains methods to get metadata about input parameters for 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.InputParameter Methods

The following are methods for Action.InputParameter.

getAdditionalAttributes()

Gets a list of additional attributes for an invocable action input parameter.

Signature

public List<Invocable.Action.AdditionalAttribute> getAdditionalAttributes()

getApexClass()

Gets the Apex class name of an input parameter for an invocable action.

Signature

public String getApexClass()

Return Value

Type: String

Apex class name of the input parameter of the invocable action.

getByteLength()

Gets the maximum byte length of an input parameter of an invocable action.

Signature

public Integer getByteLength()

Return Value

Type: Integer

Maximum byte length of the input parameter of the invocable action.

getConfiguration()

Indicates whether an input parameter of an invocable action is a configuration parameter.

Signature

public Boolean getConfiguration()

Return Value

Type: Boolean

This method returns true if the input parameter of the invocable action is a configuration parameter.

getDefaultValue()

Gets the default value for an input parameter of an invocable action.

Signature

public Object getDefaultValue()

Return Value

Type: Object

The default value, or null if no default is defined.

getDescription()

>Gets the description of an input parameter of an invocable action.

Signature

public String getDescription()

Return Value

Type: String

Description of the input parameter of the invocable action.

getLabel()

Gets the label of an input parameter of an invocable action.

Signature

public String getLabel()

Return Value

Type: String

Label of the input parameter of the invocable action.

getMaxOccurs()

Gets the maximum number of occurrences for an input parameter of an invocable action.

Signature

public Integer getMaxOccurs()

Return Value

Type: Integer

Maximum number of occurrences for the input parameter of the invocable action. If occurrences are unbounded, returns -1.

getName()

Gets the name of an input parameter of an invocable action.

Signature

public String getName()

Return Value

Type: String

Name of the input parameter of the invocable action.

getPicklistValues()

Gets a list of picklist values for an input parameter of an invocable action.

Signature

public List<Invocable.Action.PicklistValue> getPicklistValues()

Return Value

Type: List<Invocable.Action.PicklistValue>

getPlaceholderText()

Gets the placeholder text of an input parameter of an invocable action.

Signature

public String getPlaceholderText()

Return Value

Type: String

Placeholder text of the input parameter of the invocable action.

getRequired()

Indicates whether an input parameter of an invocable action is required.

Signature

public Boolean getRequired()

Return Value

Type: Boolean

This method returns true if the input parameter of the invocable action is required.

getSObjectType()

Gets the sObject type of an input parameter of an invocable action.

Signature

public String getSObjectType()

Return Value

Type: String

SObject type of the input parameter of the invocable action.

getSetupReferenceType()

Gets the setup reference types of an input parameter of an invocable action.

Signature

public List<String> getSetupReferenceType()

Return Value

Type: List<String>

List of setup reference type identifiers of the input parameter of the invocable action.

getToolingType()

Gets the tooling type of and input parameter of an invocable action.

Signature

public String getToolingType()

Return Value

Type: String

Tooling type of the input parameter of the invocable action.

getType()

Gets the data type of an input parameter of an invocable action.

Signature

public String getType()

Return Value

Type: String

Data type of the input parameter of the invocable action.