Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

(0) ShareShare
ReportReport
Posted on by 55

I was trying to un-managed import solution from development instance to SIT. Below are the some observations while importing.

1. For the First time, Solution got imported successfully in SIT but later on it is failing in solution import with same entity. 

2. It is also failing, if i tries to re import in SIT environment from the solution taken from Development and SIT environment without any modifications done in customisation XML.

Please suggest, What could be the probable cause and its solution? Also in Import log we don't have much relevant information that i could use for troubleshooting.

*This post is locked for comments

  • Verified answer
    RajeevPentyala Profile Picture
    RajeevPentyala 35 on at
    RE: Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

    Hi,

    This could be the issue with "customcontroldefaultconfig" tag in "Customization.xml" file which is known product issue.

    You can either remove all the tags from "customization.xml" file (Similar thread:https://community.dynamics.com/crm/f/117/t/202805).

    or

    You can run the C# code to delete all the "customcontroldefaultconfig"

    http://blog.sonomapartners.com/2017/01/ive-got-99-problems-and-customcontroldefaultconfig-is-one.html

    Run the above code before solution import.

    Thanks,

    Rajeev

  • Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

    Hey Kumar ,

      Were you ever able to figure out a solution or work around? I have the same issue.

  • Kumar Sourav Profile Picture
    Kumar Sourav 55 on at
    RE: Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

    We are using un-managed solution for moving solution components across environments.

    Initially solution was moved as un-managed solution with the same entity. Now deleting the entity in upper environments will cause the data lose.

  • TheMarkChristie Profile Picture
    TheMarkChristie 10,328 on at
    RE: Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

    Is the entity you are trying to import already in the system as a managed solution?

    Have you also tried to delete the old solution before brining this one in

  • Kumar Sourav Profile Picture
    Kumar Sourav 55 on at
    RE: Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

    Hi Mark,

    Below is the screenshot

    85345.Capture.PNG

    Regards,

    Kumar

  • TheMarkChristie Profile Picture
    TheMarkChristie 10,328 on at
    RE: Error while importing un-managed solution in CRM 2016 online: Can't insert duplicate key for an entity!!

    Do you have an error log? Are there any dependency warnings on exporting the solution?

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans