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.
GlobalPicklist
File Suffix and Directory Location
GlobalPicklist components have the suffix .globalPicklist and are stored in the globalPicklist folder.
Version
GlobalPicklist components are available in API version 37.0 only. In API version 38.0 and later, GlobalPicklist is replaced by the GlobalValueSet type.
Fields
| Field Name | Field Type | Description |
|---|---|---|
| description | string | It’s useful to state the global picklist’s purpose, and which objects it’s intended for. Limit: 255 characters. |
| globalPicklistValues | GlobalPicklistValue[] | Requires at least one value. The list of values, or “picklist value set,” that’s defined for a global picklist. The picklist value set is inherited by any custom picklist field that’s based on that global picklist. Each value is of type GlobalPicklistValue. A global picklist can have up to 1,000 total values, including inactive values. |
| masterLabel | string | Required. A global picklist’s name, which is defined when the global picklist is created. Appears as Label in the user interface. |
| sorted | string | Indicates whether a global picklist’s value set is sorted in alphabetical order. By default this value is false. |
Declarative Metadata Sample Definition
This Territories.globalPicklist is an example of a GlobalPicklist component.
1<?xml version="1.0" encoding="UTF-8"?>
2<GlobalPicklist xmlns="http://soap.sforce.com/2006/04/metadata">
3 <description>Updated:This is a basic global picklist</description>
4 <globalPicklistValues>
5 <fullName>Northwest</fullName>
6 <default>false</default>
7 </globalPicklistValues>
8 <globalPicklistValues>
9 <fullName>Northeast</fullName>
10 <default>false</default>
11 </globalPicklistValues>
12 <globalPicklistValues>
13 <fullName>South</fullName>
14 <default>true</default>
15 </globalPicklistValues>
16 <globalPicklistValues>
17 <fullName>Southwest</fullName>
18 <default>false</default>
19 <isActive>false</isActive>
20 </globalPicklistValues>
21 <masterLabel>Territories</masterLabel>
22 <sorted>true</sorted>
23</GlobalPicklist>This example package.xml references the previous definition.
1<?xml version="1.0" encoding="UTF-8"?>
2<Package xmlns="http://soap.sforce.com/2006/04/metadata">
3 <types>
4 <members>Territories</members>
5 <name>GlobalPicklist</name>
6 </types>
7 <version>37.0</version>
8</Package>