function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tushar Arora 26Tushar Arora 26 

Error: "Picklist value in picklist not found" while deploying using ANT

Hi, on my account object, I created a picklist field - testPicklist1__c. The picklist field has various values in it. One picklist value is "abc t" & its API name is "abc". I retrieved the Account object using ANT & tried to deploy to another Salesforce org using ANT. I got the below error message -:
User-added image
Error Message says -:  "Picklist value: abc t in picklist: testPicklist1__c not found". 

When I viewed the Account.object file I found that under "testPicklist1" field definition, the picklist value is shown with full name "abc" like this <fullName>abc</fullName> as shown below -:    
<fields>
        <fullName>testPicklist1__c</fullName>
        <externalId>false</externalId>
        <label>testPicklist1</label>
        <picklist>
            <picklistValues>
                <fullName>abc</fullName>
                <default>false</default>
            </picklistValues>  
        </picklist>
</fields>

Wheras in "AOC" record type definition under the enabled picklist value, this picklist is being referenced using "abc t" as the full name like this <fullName>abc t</fullName> as shown below -:
<recordTypes>
        <fullName>AOC</fullName>
        <active>true</active>
        <label>AOC</label>
       <picklistValues>
            <picklist>testPicklist1__c</picklist>
            <values>
                <fullName>abc t</fullName>
                <default>false</default>
            </values>
     </picklistValues>
</recordTypes>
Is this what causing the above error ? How can I remove this error & deploy successfully without manually doing changes ? Thanks in advance. 
 
Best Answer chosen by Tushar Arora 26
Prosenjit Sarkar 7Prosenjit Sarkar 7
Hi Tushar, 

Can you please check with Version 39 in you package.xml and then first extract and deploy? Maybe you are getting error for version conflict.

Thanks, 
Prosenjit

All Answers

Prosenjit Sarkar 7Prosenjit Sarkar 7
Hi Tushar, 

Can you please check with Version 39 in you package.xml and then first extract and deploy? Maybe you are getting error for version conflict.

Thanks, 
Prosenjit
This was selected as the best answer
Tushar Arora 26Tushar Arora 26
Oh! I was missing the latest metadata API version which is for the picklist API name feature that was added in Spring ’17 release. I retrieved after changing package.xml to version 39 and then deployed and it worked. https://developer.salesforce.com/blogs/developer-relations/2017/01/keeping-picklist-integrations-safe-using-api-names.html  Thanks Prosenjit for pointing it out. 
Sai AytaSai Ayta
Hi Tushar,

Can you please provide details on how to update the package.xml version to version 39?
Thanks for your help!

 
Tushar Arora 26Tushar Arora 26
Hi Sai,
             There will be a version tag in your package.xml file. Change the version from there.
 
<version>36.0</version>