0

I made some changes in the Salutation standard value set which I'd like to move across Sandboxes. For the picklist itself it's easy as the Salutation StandardValueSet is possible to retrieve via the sfdx command.

Problems start when I try to retrieve Record Type assignments for the Lead object for instance. The sfdx force:source:retrieve -m RecordType:Lead.Lead command does create the Lead.recordType-meta.xml file, however without the Salutation picklist assignment. I tried to add it manually with the following snippet:

<picklistValues>
    <picklist>Salutation</picklist>
    <values>
        <fullName>TestValue</fullName>
        <default>true</default>
    </values>
</picklistValues>

Sadly, with no success. The error which I received, when I tried to deploy it to another Sandbox:

force-app\main\default\objects\Lead\recordTypes\Lead.recordType-meta.xml An unexpected error occurred. Please include this ErrorId if you contact support: 1240518550-106518 (111178417) (3:66)

I'm a little surprised as other standard picklists are possible to manage this way, an Industry for instance - this one works pretty fine.

Any thoughts? Thanks!

1 Answer 1

1

Turns out that the Salutation picklist has other name in Record Type's XML configuration - it's "Name". Changing <picklist>Salutation</picklist> to <picklist>Name</picklist> in the snippet above fixes the problem. In overall, if one of Lead's record types is called "Lead", the Lead.recordType-meta.xml file should look something like this:

<?xml version="1.0" encoding="UTF-8"?>
<RecordType xmlns="http://soap.sforce.com/2006/04/metadata">
    <fullName>Lead</fullName>
    <active>true</active>
    <businessProcess>Lead</businessProcess>
    <label>Lead</label>
    <picklistValues>
        <picklist>Industry</picklist>
        <values>
            <fullName>Oil&Gas</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Real Estate</fullName>
            <default>false</default>
        </values>
    </picklistValues>
    <picklistValues>
        <picklist>Name</picklist>
        <values>
            <fullName>Mr.</fullName>
            <default>false</default>
        </values>
        <values>
            <fullName>Ms.</fullName>
            <default>false</default>
        </values>
    </picklistValues>
</RecordType>

You must log in to answer this question.

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