4

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 Answer 1

4

[EDIT 12/2021]: Looks like the issue is fixed. I was able to retrieve and then deploy ContractStatus StandardValueSet. groupingString is now part of the metadata file.

[ORIGINAL ANSWER]: 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

0

You must log in to answer this question.

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