+ Start a Discussion
naveen reddy 19naveen reddy 19 

Error deploying using ANT migration tool

Hi ,

 Im trying to deploy changes using ANT migration tool.

I'm getting below error. Please help me. Any help is really appreciated.
API Name Type        Line   Column     Error Message
Account  Custom Object 0 0 Custom Field Definition ID: bad value for restricted picklist field: RecordType

Thanks,
Naveen
Best Answer chosen by naveen reddy 19
naveen reddy 19naveen reddy 19
We have identified that the issue is with the following property

 <recordTypeTrackHistory>true</recordTypeTrackHistory>

We have removed it from metadata file and issue got resolved.

Thanks,
Naveen.

All Answers

CNishantCNishant
in your package.xml check what is the picklist value , i believe it has been changed and some extra characters are added
CNishantCNishant
Like "/" to "%2F" and "," to "%2C"
naveen reddy 19naveen reddy 19
Yes, There are some special character liek this
RecordType.DeveloperName = &apos;Account&apos;,RecordType.DeveloperName=&apos;Legal_Entity&apos;

How can I replace this in metadata file.

Thanks,
Naveen
CNishantCNishant

Yeah thats kind of a manual effort I believe, find and replace with correct API name.

I used that using notepad++ if you know better tool you can use that.

 

naveen reddy 19naveen reddy 19
We have identified that the issue is with the following property

 <recordTypeTrackHistory>true</recordTypeTrackHistory>

We have removed it from metadata file and issue got resolved.

Thanks,
Naveen.
This was selected as the best answer
tgagne56tgagne56
So, is the correct answer to escape the characters in package.xml or leave them unescaped?  I'm having a world of problems with profiles with periods and parenthesis.  Don't ask me what they were named that way.
Jamie BrowningJamie Browning
The Selected Answer Here is Fantasic.

The Other potential answer which refer to "/" to "%2F" and "," to "%2C", also seen elsewhere in the internet are a load of rubbish.
This may have once been an issue, but the escaped characters within the.object file are perfectly fine, and should not be adjusted

If you were to put them into SF via the GUI via SETUP, then salesforce would expect the unescaped version.