6

Standard Picklist Fields were renamed in the Metadata API from "CustomField" (v37) to "StandardValueSet" (v38).

Now, in v39 they are back to "CustomField", but when you retrieve one of this Standard Picklist Fields, the Metadata API doesn't get any values, therefore, there's no way you can deploy Standard Picklist Fields' values.

Has anyone faced this same issue?

2 Answers 2

5

You can still get the picklist values for standard fields using the StandardValueSet. To get the Account.Type field values, put this in your package.xml:

<types>
    <members>AccountType</members>
    <name>StandardValueSet</name>
</types>

Check this page to get the name of the value set for all standard picklist fields.

Also note that you can get the translations for the value sets by using:

<types>
    <members>*</members>
    <name>StandardValueSetTranslation</name>
</types>
2
  • Hi rael_kid. Many thanks for your reply, but the situation is I have a CI process that automatically describes the Org and lists the Metadata, and then executes the retrieve.. In my exact issue, Case.Reason is being listed as "CustomField", instead of StandardValueSet (it seems StandardValueSet doesn't apply anymore, since you get an empty list for that type...). So this is really breaking all my automation. Commented Mar 10, 2017 at 10:12
  • Hey, my mistake. You are right. Even though you don't get any members when listing StandardValueSet, you can still retrieve the values. Thanks Commented Mar 10, 2017 at 10:26
0

I recommend downloading the necessary metadata as change sets from your source org using Workbench --> Migration --> Retrieve instead. You can select the Api version you want before connecting, then the object and fields will have the proper format in the downloaded xmls.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .