Saturday, December 13, 2008

A record with these values already exists. A duplicate record cannot be created. Select one or more unique values and try again.

Recently, I faced the problem of different MS CRM customization files on my Production and Staging servers. When I finished customization on Staging server, I was to upload this customization to Production for live environment. All plugins were deployed onto production system, but when I tried to upload the staging customization file to production it gave me an error "A record with these values already exists. A duplicate record cannot be created. Select one or more unique values and try again."  
This message started appearing because during my development stage my Project Manager created some views for entities directly on the production. So the 2 CRM systems went out of sync. We both tried alot of things to solve it, but all in vain. I also contacted Microsoft CRM help team(Customer Source), they suggested using CRM tracing tool.  

Finally, we used the tracing tool to monitor the uploading process on production system. We found out problems with a view. I removed that view production system and tried again. Again and again I removed many view from production system. Then only after removing all the views that were created after I copied the CRM system from production to staging, I was able to upload the customizations to Production system. 

No comments: