Skip to main content
Skip table of contents

describePicklist

Retrieves the possible values of a specified picklist field and stores them into the variable context as a Collection. Each picklist value is in the Collection as a String.

Attributes

var

Required

Value type

EL-evaluated

Yes

String

No

Defines the name of the variable holding the Collection of possible picklist values. 

object

Required

Value type

EL-evaluated

Yes

String

Yes

Defines the object type whose picklist field's options are retrieved. The resolved String should be the object type's API name.

field

Required

Value type

EL-evaluated

Yes

String

Yes

Defines the picklist field whose values are retrieved. The resolved String should be the API name of a picklist field. 

Examples

The describePicklist command is well-suited for replicating a Salesforce picklist on a Screen. First, acquire the picklist data with the command.

CODE
<describePicklist var="oppStages" object="Opportunity" field="StageName">

The produced variable, a Collection of the picklist's values, could then become the options of a HTML select element.

CODE
<select name="selectedStage"><option dyn-repeat="oppStages" dyn-repeat-var="stage" dyn-value="stage" dyn-content="stage"></option></select> 
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.