Newer Version Available

This content describes an older version of this product. View Latest

StandardValueSet

Represents the set of values in a standard picklist field. This type extends the Metadata metadata type and inherits its fullName field.

File Suffix and Directory Location

StandardValueSet components have the suffix .standardValueSet and are stored in the standardValueSets folder.

Version

StandardValueSet components are available in API version 38.0 and later.

StandardValueSet isn’t available in Tooling API. Picklist elements in Tooling API are represented as in API version 37.0.

Note

Fields

Field Name Field Type Description
sorted boolean Required. Indicates whether a global value set is sorted in alphabetical order. By default, this value is false.
standardValue StandardValue[] Defines each value in a standard picklist’s value set.

Declarative Metadata Sample Definition

The following example shows a StandardValueSet component that’s defined as the Stage standard picklist on a customized opportunity object.
1<?xml version="1.0" encoding="UTF-8"?>
2<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
3    <fullName>OpportunityStage</fullName> <!-- Enum name -->
4    <standardValue>
5       <fullName>Closed Abandoned</fullName>
6    </standardValue>
7    <standardValue>
8       <fullName>Closed Won</fullName>
9    </standardValue>
10    <standardValue>
11       <fullName>Closed Lost</fullName>
12    </standardValue>
13</StandardValueSet>
14
15<CustomObject>
16    <fullName>Opportunity</fullName>
17    <fields>
18       <fullName>StageName</fullName> <!-- field name -->
19       <label>Stage</label>
20       <type>Picklist</type>
21    </fields>
22    <label>ObjectWithValueSet</label>
23    <pluralLabel>ObjectWithValueSet</pluralLabel>
24    <sharingModel>ReadWrite</sharingModel>
25</CustomObject>
26
27    

For a list of standard value set names for standard picklists, see StandardValueSet Names and Standard Picklist Fields.