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.
Solution-
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
where PrimaryEntityTypeCode
in (select objecttypecode from entity
where name = ‘Impacted Entity’)
where name = ‘Impacted Entity’)
delete from CustomControlDefaultConfigBase
where PrimaryEntityTypeCode =’Impacted Entity ID‘
where PrimaryEntityTypeCode =’Impacted Entity ID‘