1

I'm trying to migrate metadata from one org to another using a package and the sfdx force:mdapi:retrieve and sfdx force:mdapi:deploy commands.

Account object's Type field is causing a Picklist value not found error (see first four errors in screenshot).

I don't use the Type field anymore so I tried to delete the picklist values but I cannot delete the last one.

And I don't see where Standard Objects / Standard Fields are pulled into my package (e.g. can't see them on package.xml) so I don't know how to exclude this metadata from my package.

Any help - deleting the last picklist value or excluding Type field from my package - would be appreciated. Thanks!

Picklist value not found

1 Answer 1

2

The problematic references appear to be in the Account Record Types Broker, Cedent, Other, and Reinsurer. Those record types include references to picklist values that are not being migrated, presumably because your package.xml doesn't include StandardValueSet metadata for Account.Type. Altering the Type field itself in your source org won't fix the problem unless all custom entries are removed.

You can solve the issue by

  • removing references to custom picklist entries in the XML metadata for these Record Types;
  • removing the Record Types (or the Account object, if applicable) from your package;
  • or adding the StandardValueSet AccountType to your package.
1
  • 1
    Thanks, David! I think all the suggestions you provided would work. I fixed this by doing something similar to your first bullet. Since I don't use this field anymore I reset the picklist values to the default picklist values (created a scratch org to find default values and copied them to my org). Then I repackaged. This removed the custom picklist entries from my XML file without editing the XML file itself (I used Package Manager to generate a new XML). Do you know if there's a way to add StandardValueSet from Package Manager? Or do I need to manually edit the XML to add this?
    – tjc4
    Aug 6, 2019 at 15:16

You must log in to answer this question.

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