3

I executed a retrieve via the metadata API with the following package xml:

<types>
   <members>Lead.Status</members>
   <name>CustomField</name>
</types>

From this i got the following metadata snippet from Lead.object:

<fields>
    <fullName>Status</fullName>
    <trackFeedHistory>true</trackFeedHistory>
    <type>Picklist</type>
</fields>

But where is the actual values for the picklist? Is there something particular about lead.status that I should be aware of?

8

Assuming you are on API version 38.0 or later, this is what the documentation states:

Standard Picklist Fields

In API version 38.0 and later, the StandardValueSet type represents standard picklists. Picklists are no longer represented by fields as in earlier versions.

You will need to add the below element in your package.xml to retrieve the Lead' standard Status field (you can find more on the standard value sets here):

<types>
   <members>LeadStatus</members>
    <name>StandardValueSet</name>
</types>

Once retrieved, the values appear as in the below screenshot.

enter image description here

0
2

LeadStatus is a standard picklist field. When using Metadata API version 38.0, standard picklist values are available through the StandardValueSet Metadata object.

package.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<Package xmlns="http://soap.sforce.com/2006/04/metadata"> 
<types> 
<members>LeadStatus</members> 
<name>StandardValueSet</name> 
</types> 
<version>38.0</version> 
</Package> 

Source 1: https://help.salesforce.com/articleView?id=000247180&type=1

Source 2: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/standardvalueset_names.htm

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.