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.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| groupingStringEnum | string | Groups picklist and enumerated values. For example, for the picklist values of the Status field on the Service Appointment object, Done and Finished can both have a grouping string of Completed. Available in API version 41.0 and later. |
| 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. The
groupingString value is available in API version 38.0 and
later. When you deploy a StandardValueSet, this array must contain at least one picklist value. Otherwise, you receive an error. |
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.
Wildcard Support in the Manifest File
This metadata type doesn’t support the wildcard character * (asterisk) in the package.xml manifest file. For information about using the manifest file, see Deploying and Retrieving Metadata with the Zip File.