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.

When setting standardValue on Record Types, including person account record types, new picklist values loaded into your organization through the Metadata API don’t display in the picklist UI by default. For users to see the new values, go to the Record Types list for the object containing the picklist field, click Edit, and add the new value to the Selected Fields list.

Note

Declarative Metadata Sample Definition

The following example shows a StandardValueSet component that’s defined as the Stage standard picklist on a customized opportunity object.
<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>OpportunityStage</fullName> <!-- Enum name -->
    <standardValue>
       <fullName>Closed Abandoned</fullName>
    </standardValue>
    <standardValue>
       <fullName>Closed Won</fullName>
    </standardValue>
    <standardValue>
       <fullName>Closed Lost</fullName>
    </standardValue>
</StandardValueSet>

<CustomObject>
    <fullName>Opportunity</fullName>
    <fields>
       <fullName>StageName</fullName> <!-- field name -->
       <label>Stage</label>
       <type>Picklist</type>
    </fields>
    <label>ObjectWithValueSet</label>
    <pluralLabel>ObjectWithValueSet</pluralLabel>
    <sharingModel>ReadWrite</sharingModel>
</CustomObject>

    

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.