Object Deploy fails with: "duplicate value found: <unknown> duplicates value on record with id"

Editor's Note: This issue has been resolved in Winter 19


Figured out the problem. Some Salesforce issue with History tracking was the root cause. Turned off history tracking in dest org and once the history object was eliminated, the object could once again be deployed.

Not sure why there was an issue, though the object label was changed in the source org. I think SFDC was trying to recreate the History Object during the object deploy. I would have to say there's an underlying Salesforce Bug that should be resolved here, but a 2 minute workaround is better than the full day lost having to go through their support process.


Another possibility, for others that may encounter that error message, is listed on the DreamFactory Wiki:

Description: Found when you push Record Types and another Record Type with the same API name but different Label exists on the destination.

Workaround: Execute a Compare Asset and ensure that the Labels and API names match on both sides.


Removing the history tracking in the destination org didn't resolve this for me. Performing a find and replace on the object's XML file for History>true to History>false did the trick. All of the <trackHistory> and <recordTypeTrackHistory> needed to be set to false in the objects XML file. Don't forget the <recordTypeTrackHistory> I missed it on the first pass.