Importing managed solution in MS Dynamic CRM Error-A record with these values already exists.

What is the Issue?

When you try to import some managed solution to the MS CRM organization, It shows the error A record with these values already exists. A duplicate record cannot be created. Select one or more unique values and try again.”  and import fails.
When you download the import Log you can find the error as below-


The reason-

This happens due to manually updated the entity in target environment and you try to import the customization on that entity.
This creates the record in CustomControlDefaultConfigBase , due to which MS CRM won’t allow you to insert new entry in database.


The solution to import these type of entity customization ,you need to delete the old database entry of your target environment by query-

select * from CustomControlDefaultConfigBase 
where PrimaryEntityTypeCode 
in (select objecttypecode from entity 
where name = Impacted Entity’)
delete from CustomControlDefaultConfigBase 
where PrimaryEntityTypeCode =Impacted Entity ID


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s