Couldn’t import a Custom Control Default Config for ObjectTypeCode 10022 because its ‘customcontroldefaultconfigid’ already exists on the system.

No comments

Issue:

When doing Dynamic CRM OnPremise deployment, you might get above error. I am not sure of the actual root cause but there are few fixes that you can apply.

In my recent blog i have showed a fix for CustomControlDefaultConfig related error :  https://rawishblog.wordpress.com/2018/05/10/singleton-retrieve-query-should-not-return-more-than-1-record-manged-solution-import-error-onpremise/

 

Resolution:

For the above error where it talks about duplicate CustomControlDefaultConfig , you can use below method.

Use below query to find out the duplicates:

with lst as (
select CustomControlDefaultConfigId, count(*) cnt
from CustomControlDefaultConfig
group by CustomControlDefaultConfigId
having count(*) > 1
)
select ent.name, lst.CustomControlDefaultConfigId, cfg.CustomControlDefaultConfigIdUnique,   cfg.*
from lst
inner join CustomControlDefaultConfig cfg on cfg.CustomControlDefaultConfigId = lst.CustomControlDefaultConfigId
left join entity ent on ent.ObjectTypeCode = cfg.PrimaryEntityTypeCode

 

Once you have the duplicates , delete those records from this environment, export the solution again & finally try to import to other environment. Hopefully this will resolve the issue.

 

Cheers!

Advertisements

Leave a Reply

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

WordPress.com Logo

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

Google+ photo

You are commenting using your Google+ 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

This site uses Akismet to reduce spam. Learn how your comment data is processed.