Salesforce Error: duplicate value found: duplicates value on record with id:
Migration an entire salesforce org from one instance to another is real headache for person who will do it. The main trouble is that during development we create a many relationships and dependencies between app’s components. As a result when you try to migrate it you meet a dependency hell. Today I have to install the old version of application which was frozen a half year ago to developer org (because a fresh dev. org have no any dependency while sandbox have all metadata from Production).
The first step for such kind of migration is creation data model, because of all other components have a dependencies on data model. For this app I have to migrate 46 objects (both standard and custom).
I’m trying to deploy it via Eclipse and got a pretty interesting and fully obfuscated error
Error: objects/Account.object(Account):duplicate value found: <unknown> duplicates value on record with id: <unknown>
A quick investigation in Google provides the answer that the cause is enabled history tracking on object. And as a solution we should disable it on destination org and if it’s not a trouble and can take no more that 1 minute, the second part of the solution not seems such simple and clear. We need to disable a history tracking directly on object. So let’s investigate the object’s metadata file and try to find it.
Let’s disable all. And try again. Oh, this mysterious error didn’t disappear. We need to search any other properties for history tracking.
So, seems that no other property might not to be a reason of troubles. Let’s deploy it.
Yeah! Error has disappeared. Hope that this article will save a time for you.