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.InputParameter Class
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.InputParameter Methods
The following are methods for Action.InputParameter.
getAdditionalAttributes()
Signature
public List<Invocable.Action.AdditionalAttribute> getAdditionalAttributes()
Return Value
getApexClass()
Signature
public String getApexClass()
getByteLength()
Signature
public Integer getByteLength()
getConfiguration()
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()
Signature
public Object getDefaultValue()
Return Value
Type: Object
The default value, or null if no default is defined.
getDescription()
Signature
public String getDescription()
getLabel()
Signature
public String getLabel()
getMaxOccurs()
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()
Signature
public String getName()
getPicklistValues()
Signature
public List<Invocable.Action.PicklistValue> getPicklistValues()
Return Value
getPlaceholderText()
Signature
public String getPlaceholderText()
getRequired()
Signature
public Boolean getRequired()
Return Value
Type: Boolean
This method returns true if the input parameter of the invocable action is required.
getSObjectType()
Signature
public String getSObjectType()
getToolingType()
Signature
public String getToolingType()