5

I am migrating objects from one org to another using the ant migration tool and came across the following error.

Custom Field Definition ID: bad value for restricted picklist field: RecordType

I thought it would be because I had picklist fields in the record type definition that didn't exist, but I doubled checked my object model and it seems fine (took out 3rd party dependencies). Any idea what other reasons this might pop up due to?

UPDATE: I had pulled down the XML from the Force IDE, and apparently picklist values for each Account and Opportunity had converted a "/" to "%2F" and "," to "%2C" in the picklist definitions in the record type section. The field picklist values remained fine with the "/" or ",". Unfortunately, still getting the error. Wondering if I just have to manually audit all of the record type picklist values against the field definition in the XML :(

  • Can you just try migrating the object causing issue using changeset.Here is an example how this issue was resolved boards.developerforce.com/t5/General-Development/… – Mohith Shrivastava Jul 1 '13 at 18:54
  • Somehow I got past it in my debugging attempts by only picking 1 record type and 1 value in each picklist, and then once it was in uncommenting the rest and it went in fine. I still don't know what the actual issue was though... – Michael Welburn Jul 1 '13 at 21:14
3

I had pulled down the XML from the Force IDE, and apparently picklist values for each Account and Opportunity had converted a "/" to "%2F" and "," to "%2C" in the picklist definitions in the record type section. The field picklist values remained fine with the "/" or ",". Unfortunately, still getting the error. Wondering if I just have to manually audit all of the record type picklist values against the field definition in the XML :(

| improve this answer | |
0

@Michael Welburn I was doing a similar migration and ran into this error. Way I resolved it is much different and I am not sure if thats the best solution, still wanted to share my approach so that others can benefit.

I was trying to deploy Lead object(along with business process, record types etc) from one SFDC instance to another and got this error. To resolve this, I did create one dummy business process in the target sfdc instance and then tried to deploy my ANT package and it worked fine. Before creating business process manually i did the xml file for my lead object and it didnt had any special characters that might cause issues.

Hope it helps.

| improve this answer | |
0

We had the same issue while deploying to a sandbox

Custom Field Definition ID: bad value for restricted picklist field: RecordType

Whe had some picklist values that contains "/" but even when I deleted those value, I was still got the error

I applied the following workaround : manually creating the record types in the dest sandbox then deploying the rest using the Metadata API

| improve this answer | |
0

I have the same error for scratch orgs on some standard objects (Account, Contact, Lead, and Opportunity).

As a workaround, I found that after removing "recordTypeTrackHistory" from the object metadata file or setting the value to false then the deployment succeeded.

| improve this answer | |

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.