2

I simply want this to be pushed into a new scratch org

<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <sorted>false</sorted>
    <standardValue>
        <fullName>In Approval Process</fullName>
        <default>false</default>
        <label>In Approval Process</label>
    </standardValue>
    <standardValue>
        <fullName>Activated</fullName>
        <default>false</default>
        <label>Activated</label>
    </standardValue>
    <standardValue>
        <fullName>Draft</fullName>
        <default>false</default>
        <label>Draft</label>
    </standardValue>
    <standardValue>
        <fullName>Sent</fullName>
        <default>false</default>
        <label>Sent</label>
    </standardValue>
    <standardValue>
        <fullName>Received</fullName>
        <default>false</default>
        <label>Received</label>
    </standardValue>
    <standardValue>
        <fullName>Final</fullName>
        <default>false</default>
        <label>Final</label>
    </standardValue>
</StandardValueSet>

Executing sfdx force:source:push -u my-SCRATCH gives me this

src/main/default/standardValueSets/ContractStatus.standardValueSet-meta.xml Field: null is not a picklist (19:20)

At these point I deleted Sent, Received and Final statuses from the xml file, pushed and it worked. Good. Then, I created these statuses in a scratch org manually: enter image description here

sfdx force:source:status

enter image description here

After that I pulled these changes with sfdx force:source:pull

enter image description here

When I created a fresh new Scratch org, I again got the initial error

Field: null is not a picklist

This is awkward, sad, confusing... How can I push ContractStatus.standardValueSet-meta.xml into a scratch org?

My guess is that it must be something connected to Status Category. Each picklist item is associated with it, but there is no relevant property that describes it in metadata schema StandardValue.

I am using this sfdx-project.json:

{
  "packageDirectories": [
    {
      "path": "src", "default": true
    }
  ],
  "namespace": "",
  "sfdcLoginUrl": "https://login.salesforce.com",
  "sourceApiVersion": "47.0"
}
1

Unfortunately this is currently a bug in the Metadata API.

We've been talking about it for a while, and I currently have a Case open for it. Please add your voice to the discussion on the Trailblazer Community on this thread, the more people asking for it, the more likely they fix it.

Create another case may help too.

[EDIT]: A Known Issue has been created for this, have a look here

2
  • Thanks, for your response! We've started converting our project into SFDX and it's all pain. – Eduard Oct 17 '19 at 10:17
  • 1
    I've edited the "answer" to add the link to the Known Issue that has just been created. – Fabien Taillon Oct 30 '19 at 12:06

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.