1

So i am pulling in changes (sf:retrieve) from a sandbox using the SF migration tool. And while doing so, a custom field of type picklist, that have a value Not Appointed/Open is getting encoded. So when i look into the metadata, i see it like so, which is encoded: Not Appointed%2FOpen. Now when i try to deploy/migrate this metadata, it errors out Picklist value: Not Appointed%2FOpen in picklist: a_b_x__c not found

Why is the migration tool not able to handle the deployment of encoded components? Is this is a bug in the migration tool?

  • What API version do you have in the package.xml. Another similar question suggests it needs to be v39,0 or higher to deal with the Spring '17 changes. See also Keeping Picklist Integrations Safe by Using API Names – Daniel Ballinger Oct 4 '17 at 18:28
  • Thanks Daniel. Is there any considerations that i need to make before i bump up the version of the API in package.xml? Right now its on 38. I have the metadata in version control, so i kind of need to caution that i dont break another wile trying to fix this – OK999 Oct 4 '17 at 18:40
  • The change in the Metadata API format to support picklist labels is the only thing that immediately springs to mind. You will need to update all the picklists. – Daniel Ballinger Oct 4 '17 at 18:50
2

The likely cause of a Picklist value: X in picklist: Y not found message is trying to deploy a value defined since Spring '17 with a package.xml API version earlier than v39.0.

The format was changed in Spring '17 to support labels. See Keeping Picklist Integrations Safe by Using API Names

You will need to update the metadata for all the picklist values when updating the API version.

  • "You will need to update the metadata for all the picklist values when updating the API version." .. Does this mean, i need to retrieve again after bumping up the API version in the package.xml? I am retriving via the package.xml and its doesn;t have room for api versions of specific components – OK999 Oct 4 '17 at 18:50
  • @OK999 If you have any other picklists defined in the metadata you should update their valueSetDefinitions to include the label as well. – Daniel Ballinger Oct 4 '17 at 18:53
  • 2
    This have a good read for the API version management for distributed teams: developer.salesforce.com/blogs/developer-relations/2013/10/… – OK999 Oct 4 '17 at 19:07

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.