3

I'm trying to push an existing project to a scratch org for the first time. I get the following errors:

=== Push Errors
PROJECT PATH                                                                             ERROR
───────────────────────────────────────────────────────────────────────────────────────  ───────────────────────────────────────────────────
force-app/main/default/objects/Case/businessProcesses/Standard.businessProcess-meta.xml  Picklist value: PA In Progress not found (3:24)
force-app/main/default/objects/Case/businessProcesses/Standard.businessProcess-meta.xml  Required field is missing: businessProcess (138:18)
force-app/main/default/objects/Case/recordTypes/Filled_Prescription.recordType-meta.xml  Required field is missing: businessProcess (48:18)

Here are the files that are mentioned in the project path:

Standard.businessProcess-meta.xml

<?xml version="1.0" encoding="UTF-8"?>
<BusinessProcess xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Standard</fullName>
    <description>All status options.</description>
    <isActive>true</isActive>
    <values>
        <fullName>Doctor Issue</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Follow Up Call</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Initial Call</fullName>
        <default>true</default>
    </values>
    <values>
        <fullName>PA In Progress</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Preparing for Fill</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Prescription Deleted</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Prescription Filled</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Prescription On Hold</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Transfer Complete</fullName>
        <default>false</default>
    </values>
    <values>
        <fullName>Transfer Requested</fullName>
        <default>false</default>
    </values>
</BusinessProcess>

Filled_Prescription.recordType-meta.xml

<?xml version="1.0" encoding="UTF-8"?>
<RecordType xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Filled_Prescription</fullName>
    <active>true</active>
    <description>A locked page layout for all filled prescriptions. Must open case to write to fields.</description>
    <label>Filled Prescription</label>
    <picklistValues>
        <picklist>Origin</picklist>
        <values>
            <fullName>Email</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Phone</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Web</fullName>
            <default>false</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Priority</picklist>
        <values>
            <fullName>High</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Low</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Medium</fullName>
            <default>true</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Reason</picklist>
        <values>
            <fullName>Breakdown</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Equipment Complexity</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Equipment Design</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Feedback</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Installation</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Other</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Performance</fullName>
            <default>false</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Type</picklist>
        <values>
            <fullName>Electrical</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Electronic</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Mechanical</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Other</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Structural</fullName>
            <default>false</default>
        </values>
    </picklistValues>
</RecordType>

In my package.xml, I did a wild card to get all business processes

<types>
    <members>*</members>
    <name>BusinessProcess</name>
</types>

I'm not sure what I'm missing.

  • I'm shocked there is nothing is the dx docs on Push Errors... – Tyler Zika Apr 7 '18 at 2:09
  • If you run sfdx force:source:convert you will create a local copy of the metadata format files which might then correspond to the line numbers such as 138 and 48 and make the errors more meaningful? We have experienced errors on pushes too where the information provided is insufficient to diagnose the problem . – Keith C Apr 7 '18 at 10:18
  • @KeithC the code I shared with you was from my local copy. Those lines mentioned in the errors don't correspond to what I have locally. – Tyler Zika Apr 7 '18 at 19:29
1

I had issues similar to yours as well.

In my case it helped to create a recordtype in the new scratch org first. Push went through without issues after that.

0

The picklist value error suggests that you are not deploying the value set that contains the "PA In Progress" value. The value set for Case.Status is called CaseStatus.

See the metadata docs for the mapping between standard picklist fields and StandardValueSet names. (If you're using custom value sets as well, they are a different metadata type, GlobalValueSet.)

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.