Action.OutputParameter Class
Contains methods about metadata returned by invocable actions.
Namespace
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}
25Action.OutputParameter Methods
The following are methods for Action.OutputParameter.
getAdditionalAttributes()
Gets a list of additional attributes for an invocable action output
parameter.
Signature
public List<Invocable.Action.AdditionalAttribute> getAdditionalAttributes()
Return Value
getApexClass()
Gets the Apex class name of an output parameter for an invocable action.
Signature
public String getApexClass()
getDescription()
Gets the description of an output parameter of an invocable action.
Signature
public String getDescription()
getLabel()
Gets the label of an output parameter of an invocable action.
Signature
public String getLabel()
getMaxOccurs()
Gets the maximum number of occurrences for an output parameter of an invocable
action.
Signature
public Integer getMaxOccurs()
Return Value
Type: Integer
Maximum number of occurrences for the output parameter of the invocable action. If occurrences are unbounded, returns -1.
getName()
Gets the name of an output parameter of an invocable action.
Signature
public String getName()
getPicklistValues()
Gets a list of picklist values for an output parameter of an invocable
action.
Signature
public List<Invocable.Action.PicklistValue> getPicklistValues()
Return Value
getSObjectType()
Gets the sObject type of an output parameter of an invocable action.
Signature
public String getSObjectType()