Solution import SQL error / Same Key RRS feed

  • Question

  • Hi all,

    I'm exporting a solution including the account or contact entity from our 2015 on premise environment. If I try to import the solution back into the same environment or our dev environment it gives me an SQL error during the import process. The same happens going the other way from our dev environment into our production environment or importing it back into the dev environment. Looking into the log file tells me that "an item with the same key has already been added"

    I found a few threads related to this error message but none of the possible solutions fixed the problem.

    After digging deeper I was able to at least find a workaround. If I delete the <attribute PhysicalName="OwnerId"> from the customizations.xml the import runs further. It will give me another SQL error regarding EntityRelationship so I also have to delete the <EntityRelationship Name="owner_accounts"> or <EntityRelationship Name="owner_contacts"> part from the customizations.xml. Now the import runs through.

    First of all I'm afraid that I will get problems with future CRM Upgrades. Because of the problem I'm also not able to use the CRM ribbon workbench on the account or contact entity. It will give me the SQL error while publishing the changes I made.

    Any help would be appreciated.



    Wednesday, October 7, 2015 3:18 PM

All replies

  • Export the exact same customizations that you see this problem with from both environments.  Extract and compare these tags from both environments.  The names will be case sensitive for CRM when it comes to solutions.

    If you fine that there is a difference in the case of the name, that indicates that someone deleted and later recreated it in one of the environments rather than deleting it in both, recreating it in DEV and moving it forward to Prod in a solution.  The best way to fix that would be to simply backup the PROD organization, and restore it to DEV, and continue development in that organization.  Otherwise you would need to delete it and recreate it exactly as it is in the other environment.

    Jason Peterson

    Wednesday, October 7, 2015 4:54 PM
  • Hi,

    sorry for the late reply.

    I don't think that this fixes my problem. As I wrote I'm not even able to import the solution I created in our prod environment back into the prod environment. So even if I would make a backup of our PROD and recreate it in our DEV the problem would still persist.    

    Tuesday, October 20, 2015 7:46 AM