Cannot insert duplicate key in CRM 2011 Plugin import?

1

I have exported the plugins from prod server, and getting the following error message when importing into the test server.

Unhandled Exception: System.Web.Services.Protocols.SoapException: Server was unable to process request.

Detail:

0x80040237

Cannot insert duplicate key.

Platform

at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)

at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)

at PluginRegistrationTool.CrmSdk.CrmService.Create(BusinessEntity entity)

at PluginRegistrationTool.RegistrationHelper.RegisterAssembly(CrmOrganization org, String pathToAssembly, CrmPluginAssembly assembly)

at PluginRegistrationTool.ImportExport.ImportSolution(CrmOrganization org, ICollection1 assemblies, ICollection1 checkedTreeNodes, IDictionary`2 pathList)

at PluginRegistrationTool.ImportExportForm.btnExecute_Click(Object sender, EventArgs e)

dynamics-crm
dynamics-crm-2011
dynamics-crm-4
asked on Stack Overflow Nov 19, 2012 by Hashim • edited Nov 19, 2012 by anton.burger

2 Answers

0

On your test server check if plugins/steps/images by the same name are already existing. If yes, then delete them first before attempting the import.

I would recommend that you delete all registered plungins first before attempting to import.

answered on Stack Overflow Nov 21, 2012 by patil.rahulk
0

enter image description hereWhen you create a new plugin Visual Studio will automatically create the step/class name for you based on the Pipeline Stage (Pre-Validation, Pre-Operation, Post-Operation) the Primary Entity (Contact, Organization) and the Message (Create, Update, etc) For example, PostContactUpdate or PreOrganizationUpdate, so if you happen to be making another plugin with same message, pipeline stage and primary entity and you accepted the default class names that could explain why you are getting the error. Changing the class name and redeploying should fix it for you.

answered on Stack Overflow Mar 30, 2016 by ojhurst

User contributions licensed under CC BY-SA 3.0