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.PicklistValue Class
Namespace
Example
1Invocable.Action action = Invocable.Action.createStandardAction('anotherActionName');
2List<Invocable.Action.DescribeResult> describeResults = action.getDescribe();
3
4for (Invocable.Action.DescribeResult dr : describeResults) {
5 for (Invocable.Action.InputParameter input : dr.getInputs()) {
6 List<Invocable.Action.PicklistValue> picklistValues = input.getPicklistValues();
7 if (picklistValues != null) {
8 for (Invocable.Action.PicklistValue plv : picklistValues) {
9 System.debug('Label: ' + plv.getLabel());
10 System.debug('Value: ' + plv.getValue());
11 System.debug('Is Default: ' + plv.getDefaultValue());
12 System.debug('Is Active: ' + plv.getActive());
13 }
14 }
15 }
16}
17Action.PicklistValue Methods
The following are methods for Action.PicklistValue.
getActive()
Signature
public Boolean getActive()
Return Value
Type: Boolean
This method returns true if the picklist value for the invocable action parameter is active.
getDefaultValue()
Signature
public Boolean getDefaultValue()
Return Value
Type: Boolean
This method returns true if the picklist value used by the invocable action parameter is the default value.
getLabel()
Signature
public String getLabel()
getValidFor()
Signature
public String getValidFor()
Return Value
Type: String
Valid-for dependency string of the picklist value used by the invocable action parameter, or null if no dependencies exist.