CRM 2013 Solution Import Error – An item with the same key has already been added

In CRM 2013, while importing of solution, we faced the error “An item with the same key has already been added”.

A little bit of searching and we found this very good article which describes how to resolve the error – http://nishantrana.wordpress.com/2014/04/15/an-item-with-the-same-key-has-already-been-added-error-while-importing-solution-in-crm-2013/

However as the link suggests, it was not possible for us to delete the field since we had some data where the field was populated in the target environment. Hence we had to take the alternate route.

We unzipped the customizations and looked for the field in the customizations.xml file.

For e.g. in the screen shot below, we could see the field with physical name “new_IsOpportunityCustomer”. However when we went into the customizations of the target environment the name was “new_isopportunitycustomer”. Clearly there was a difference in casing which led to the below error.

screen 8

To resolve this we changed the physical name in the customizations.xml from “new_IsOpportunityCustomer” to “new_isopportunitycustomer” and re-imported the solution and everything worked fine.

Hope this helps!

 

Advertisements

{Dynamics CRM} Found More than one RibbonDiff Entity Error- CRM 2013 Solution Import

In CRM 2013, while importing of solution, we faced the above in the Entity Ribbon of the Account Entity.

To resolve the same, we unzipped the customization file that we were importing and then opened the customizations.xml file in a xml editor and checked for the RibbonDiff part for the account entity.

We found duplicate entries in the HideCustomAction. See the screenshot below.

screen 7

 

We just removed the duplicate entries and the re-imported the solution and it worked again

Hope this helps!