8

When doing sfdx force:source:push with Account RecordTypes, I'm getting a series of errors like this:

productCatalog\main\default\objects\Account\recordTypes\AdvisorRep.recordType-meta.xml Picklist value: Competitor in picklist: Type not found (15:18)

The Type field is in the AdvisorRep.recordType-meta.xml file, and Type is a built in field. So I don't understand what this error is trying to tell me.

AdvisorRep.recordType-meta.xml:

<?xml version="1.0" encoding="UTF-8"?>
<RecordType xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>AdvisorRep</fullName>
    <active>true</active>
    <label>Advisor (Rep)</label>
    <picklistValues>
        <picklist>Industry</picklist>
        <values>
            <fullName>Agriculture</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Apparel</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Banking</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Biotechnology</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Chemicals</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Communications</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Construction</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Consulting</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Education</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Electronics</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Energy</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Engineering</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Entertainment</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Environmental</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Finance</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Food %26 Beverage</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Government</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Healthcare</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Hospitality</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Insurance</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Machinery</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Manufacturing</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Media</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Not For Profit</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Other</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Recreation</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Retail</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Shipping</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Technology</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Telecommunications</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Transportation</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Utilities</fullName>
            <default>false</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Ownership</picklist>
        <values>
            <fullName>Other</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Private</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Public</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Subsidiary</fullName>
            <default>false</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Rating</picklist>
        <values>
            <fullName>Cold</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Hot</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Warm</fullName>
            <default>false</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Type</picklist>
        <values>
            <fullName>Competitor</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Event</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>IT</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Insurance</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Legal</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Other</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Securities</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Services</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Confidential</fullName>
            <default>false</default>
        </values>
    </picklistValues>
</RecordType>
```xml
  • I think that the value Competitor is what is missing – Caspar Harmer Feb 28 '19 at 2:53
  • I added the meta xml above. In the values list for Type, the first entry is Competitor – Brian Feb 28 '19 at 2:56
  • Make sure you are pushing against the correct API level. If too low, this field/value might not be defined. – Caspar Harmer Feb 28 '19 at 2:59
  • I'm pushing this to a scratch org that I just created. – Brian Feb 28 '19 at 3:03
  • Make sure that the scratch org has all the correct features that you would expect - esp for this picklist. It could be that the api level is too high OR too low. – Caspar Harmer Feb 28 '19 at 3:23
5

You receive this error because you added custom value to the standard picklist "Type" but your source directory missing following file:

AccountType.standardValueSet-meta.xml

It should be placed under force-app/main/default/standardValueSets folder and look like

<?xml version="1.0" encoding="UTF-8"?>
<StandardValueSet xmlns="http://soap.sforce.com/2006/04/metadata">
    <sorted>false</sorted>
    <standardValue>
        <fullName>Prospect</fullName>
        <default>false</default>
        <label>Prospect</label>
    </standardValue>
    <standardValue>
        <fullName>Customer - Direct</fullName>
        <default>false</default>
        <label>Customer - Direct</label>
    </standardValue>
    <standardValue>
        <fullName>Customer - Channel</fullName>
        <default>false</default>
        <label>Customer - Channel</label>
    </standardValue>
    <standardValue>
        <fullName>Channel Partner / Reseller</fullName>
        <default>false</default>
        <label>Channel Partner / Reseller</label>
    </standardValue>
    <standardValue>
        <fullName>Installation Partner</fullName>
        <default>false</default>
        <label>Installation Partner</label>
    </standardValue>
    <standardValue>
        <fullName>Technology Partner</fullName>
        <default>false</default>
        <label>Technology Partner</label>
    </standardValue>
    <standardValue>
        <fullName>Other</fullName>
        <default>false</default>
        <label>Other</label>
    </standardValue>
    <standardValue>
        <fullName>Competitor</fullName>
        <default>false</default>
        <label>Competitor</label>
    </standardValue>
</StandardValueSet>
| improve this answer | |
  • 2
    This was the issue. For anyone reading this in the future, SFDX doesn't automatically export custom values that have been added to a Standard Value Set. So, you have to manually add an entry to your package.xml to add them. You also can't wildcard the members. - List of Standard Value Sets - How to add Standard Value Set to package.xml – Brian Mar 5 '19 at 16:04
  • Custom values can be retrieved from Scratch orgs using sfdx force:source:pull command but not sfdx force:retrieve – steals Mar 6 '19 at 17:06
  • I'm not sure if this helps anyone else, but we were getting this error on a specific record type. The value in question was on the "Type" field. The solution was to pull down and version control the "ObjectType" field, in our case it was a Task, so retrieve -m 'StandardValueSet:TaskType' – Andy Ray Jun 4 at 3:01

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.