I am using SFDX and creating scratch org to move my project metadata. But I'm facing challenge when with Standard picklist fields.

As I am moving record type and value reference in that so I am getting dependency error.

I can solve this by manually add those values in scratch org but is there any better solution available for similar problem.

  • 1
    Standard picklist values are stored in the StandardValueSet metadata type. Are you including that type in your metadata?
    – Derek F
    Apr 18, 2018 at 12:32
  • @DerekF I'm unable to find it. I am following steps here Migrating Existing Projects to Salesforce DX
    – SF User
    Apr 18, 2018 at 12:57

2 Answers 2


Like I said in my comment, Standard picklist values are stored in the StandardValueSet metadata type.

Ensuring that you include standard picklist fields in your unmanaged package might give you the standard values as well, but I'm not 100% sure on that.

The sure-fire way that I know of is to create your own package.xml file, include that metadata type in it, and retrieve using that package.xml file via

sfdx force:mdapi:retrieve -k <relative path to your package.xml> -r <relative path to your target directory> -u <username or alias of org to retrieve from>

StandardValueSet is not one of the metadata types that supports wildcard, so you'd need to explicitly state which ones you want to pull. There is documentation that covers what the standard picklist fields are, and what valueSet name to use.

The one caveat that I've run into thus far is with ContractStatus. For some reason, this one picklist's values contains extra information that is not captured in the StandardValueSet metadata type. I have not found a way to deploy customizations to this field.

Some clarification for those who may not have used the old force.com migration tool + Apache Ant.

package.xml is a file that looks like this:

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

Each metadata type that you specify is a <types> node.
For most of the metadata types, we can use the wildcard to say "just give me everything of this metadata type" (that's the <members>*</members> bit).
"StandardValueSet" cannot use the wildcard, so each standard picklist value set that you want needs to be explicitly named

    <!-- and so on... -->
  • Ok let me try this.
    – SF User
    Apr 18, 2018 at 13:25
  • @SFUser also, don't forget to convert to source form. You might want to convert into a separate directory (not sure if converting wipes out existing things in your project).
    – Derek F
    Apr 18, 2018 at 13:31
  • so just for confirmation I will create unmanaged package and convert that into SFDX and then in package.xml file I will add the standard value set and will use this to deploy.
    – SF User
    Apr 18, 2018 at 13:33
  • @SFUser not quite. I'd recommend just sticking to either the unmanaged package, or package.xml. If you need to use both, then retrieve your unmanaged package into one directory, convert to source form, then retrieve using your package.xml into a different directory, and convert that to source form (use the -d argument to specify a different folder for this conversion to prevent potential overwriting of your conversion of your unmanaged package).
    – Derek F
    Apr 18, 2018 at 13:55
  • 4
    @PetrusRepo: sfdx force:source:retrieve -m StandardValueSet:CaseType May 7, 2019 at 15:31

I put together all the standard value sets in metadata format for your package.xml files. Now you can use this to pull and push standard value sets:

<Package xmlns="http://soap.sforce.com/2006/04/metadata">

You must log in to answer this question.

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