Closed amtrack closed 7 years ago
@amtrack: could you please suggest the example package.xml which needs to be used for picking the standard picklist values? Do i need to define both CustomField and StandardValueSet in my package.xml to fetch both as below? I tried with just StandardValueSet as metadata name but it only fetches the AccountContactMultiRoles.standardValueSet. Please provide your views on this?
<name>StandardValueSet</name>
<name>CustomField</name>
@92SGupta
If you have an API version >= 38.0 in your package.xml, you should only have to list the StandardValueSet.
<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">
<types>
<members>AccountContactMultiRoles</members>
<name>StandardValueSet</name>
</types>
<version>38.0</version>
</Package>
Up to API version
37.0
standard picklist values are represented asCustomField
metadata.Starting with API version
38.0
some standard picklist values are being replaced by theStandardValueSet
andStandardValueSetTranslation
metadata type (https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_standardvalueset.htm).Unfortunately it seems that the standard fields can only be listed using the Metadata API for a single given CustomObject, so that multiple API calls would be necessary.
Further the components of
StandardValueSet
cannot be listed using the Tooling or Metadata API at all (yet, see https://success.salesforce.com/ideaView?id=0873A000000cMdrQAE).We'll need to find a solution that works well with API version
38.0
and earlier.