locked
Duplicate key error when importing plugin assembly RRS feed

  • Question

  • We’re trying to import a managed solution in CRM 2015 on premise.

    The solution just contains the Plugin Assembly.

    The import is failing with the error ‘Cannot insert duplicate key’ (the dialogue box says ‘A record with these values already exists’).

    It does not fail in every environment, but (unfortunately) our UAT and Production environments only.

    I think our next step is to delete all plugin processing steps and the assembly and them re-import both. Can’t just delete the assembly because of the dependencies. This seems like quite a desperate thing to have to do in a production environment…. And we don’t want to have to do this at every deployment.

    Anyone else come across this? Any other ideas?

    Thanks,

    Ben

     

    Thursday, September 15, 2016 1:43 PM

All replies

  • I expect the problem is that you've already got the plugin assembly in the Production and UAT environments, but this solution is not seen as an update to that assembly. The most likely reason is if the new version of the managed solution originated from a different organisation than the original version. In which case, try exporting the managed solution from the original organisation, if that's possible.


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Thursday, September 15, 2016 2:22 PM
    Moderator
  • That does sound like a possible cause. Dev and Test were upgraded from old CRM 2011 Dev and Test. Production were upgraded from old CRM 2011 Production. So they will have the same components with different IDs.

    We will try deleting Plugins and registration steps and if that works we will rebaseline all environments from production to make sure that they are all in step with each other.thanks for your help,

    Ben

    Thursday, September 15, 2016 3:39 PM
  • Hi BenHWalker,
     
    You could refer below link regarding this.

     http://mscrmhelp.blogspot.in/2008/12/record-with-these-values-already-exists.html   
     
    Thanks,
    Sam

    Inogic | Blog | news@inogic.com

    If this post answers your question, please click "Mark As Answer" on the post and "Mark as Helpful"

    Monday, September 19, 2016 1:14 PM
  • Thanks Sam, that's interesting. Another friend also suggested tracing so we'll try that if the problem persists. (We have deleted message processing steps and the plugin before successfully importing now, but if the problem happens again with the next deploy we'll try tracing.)
    Monday, September 19, 2016 1:40 PM