web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Cannot insert duplicate key - dynamics CRM 2016 on premise (update 1.0)

(0) ShareShare
ReportReport
Posted on by 195

Hi guys,

I was hoping someone could help me with this error that I am getting since updating CRM Dynamics 2016 on premise to update 1.0. The full error message is attached as image. There is no error message in the windows server log. Any assistance would be greatly appreciated!

cannot-insert-duplicate-key.png

Cheers,

Luke

*This post is locked for comments

I have the same question (0)
  • Alessandro Prandini Profile Picture
    on at

    Hi, I have the same problem...

  • LukeHendo Profile Picture
    195 on at

    Any ideas about a potential fix? I managed to get the error trace log (see below).

    # CRM Tracing Version 2.0

    # LocalTime: 2016-06-29 14:15:01.534

    # Categories: *:Error

    # CallStackOn: Yes

    # ComputerName: MAINCPU

    # CRMVersion: 8.1.0.359

    [2016-06-29 14:15:01.534] Process:OUTLOOK |Organization:fffe3699-21ad-498f-8328-bc3920573625 |Thread:   26 |Category: Application.Outlook |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 | CrmServiceForOutlook.Execute  ilOffset = 0x7

    at CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)  ilOffset = 0x7

    at EmailForOutlook.Microsoft.Crm.Application.SMWrappers.IEmailForOutlook.DeliverPromote(String messageId, String subject, String from, String to, String cc, String bcc, Double receivedon, String submittedBy, String importance, String body, IDynamicEntityCollectionForOutlook attachments, Int32 attachmentCount, IDynamicEntityForOutlook extraProperties, String entityXml, String regardingId, Int64 regardingObjectType, String crmId, Int32& notification)  ilOffset = 0x1C7

    >FaultExceptionDetails: Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=8.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot insert duplicate key.Detail:

    <OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance&quot; xmlns="schemas.microsoft.com/.../Contracts&quot;>

     <ErrorCode>-2147220937</ErrorCode>

     <ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

     <Message>Cannot insert duplicate key.</Message>

     <Timestamp>2016-06-29T04:15:01.1686786Z</Timestamp>

     <InnerFault>

       <ErrorCode>-2147220937</ErrorCode>

       <ErrorDetails xmlns:d3p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

       <Message>Cannot insert duplicate key.</Message>

       <Timestamp>2016-06-29T04:15:01.1686786Z</Timestamp>

       <InnerFault>

         <ErrorCode>-2147220937</ErrorCode>

         <ErrorDetails xmlns:d4p1="schemas.datacontract.org/.../System.Collections.Generic&quot; />

         <Message>Cannot insert duplicate key.</Message>

         <Timestamp>2016-06-29T04:15:01.1686786Z</Timestamp>

         <InnerFault i:nil="true" />

         <TraceText i:nil="true" />

       </InnerFault>

       <TraceText i:nil="true" />

     </InnerFault>

     <TraceText i:nil="true" />

    </OrganizationServiceFault>

    Server stack trace:

      at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime operation, ProxyRpc& rpc)

      at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins, Object[] outs, TimeSpan timeout)

      at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage methodCall, ProxyOperationRuntime operation)

      at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage message)

    Exception rethrown at [0]:

      at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)

      at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)

      at Microsoft.Xrm.Sdk.IOrganizationService.Execute(OrganizationRequest request)

      at Microsoft.Xrm.Sdk.Client.OrganizationServiceProxy.ExecuteCore(OrganizationRequest request)

      at Microsoft.Crm.Application.SMWrappers.ClientOrganizationServiceProxyBase.Execute(OrganizationRequest request)

      at Microsoft.Crm.Application.SMWrappers.CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)

    [2016-06-29 14:15:01.556] Process:OUTLOOK |Organization:fffe3699-21ad-498f-8328-bc3920573625 |Thread:   26 |Category: Application.Outlook |User: 00000000-0000-0000-0000-000000000000 |Level: Error |ReqId: 00000000-0000-0000-0000-000000000000 |   ilOffset = 0xFFFFFFFF

    > TraceException: Unhandled Exception: System.Runtime.InteropServices.COMException: Cannot insert duplicate key.

      at Microsoft.Crm.Application.SMWrappers.CrmServiceForOutlook.Execute(OrganizationRequest request, Boolean wrapException)

      at Microsoft.Crm.Application.SMWrappers.EmailForOutlook.Microsoft.Crm.Application.SMWrappers.IEmailForOutlook.DeliverPromote(String messageId, String subject, String from, String to, String cc, String bcc, Double receivedon, String submittedBy, String importance, String body, IDynamicEntityCollectionForOutlook attachments, Int32 attachmentCount, IDynamicEntityForOutlook extraProperties, String entityXml, String regardingId, Int64 regardingObjectType, String crmId, Int32& notification)

  • Dropbear42 Profile Picture
    on at

    Same issue encountered with CRM Online. Only happening with new installation of Office/CRM Client. Older installations are not exhibiting the problem. I have a support request in with MS

  • Saroj Das Profile Picture
    3,355 on at

    Hi,

    when you are getting this error? Are you tracking the emails from Outlook?

    Thanks,

    Saroj

  • Community Member Profile Picture
    on at

    Hi - we are experiencing the same problem with everyone we have applied update 1.0 too. There doesn't appear to be occuring when they do anything specific.

    We have CRM 2016 on premise and are using the Outlook add-in.

    Thanks

  • DanBlake Profile Picture
    on at

    Dropbear42,

    Was support able to resolve the issue for you?

    Thanks,

    Dan

  • Dropbear42 Profile Picture
    on at

    Hi Dan,

    Not yet, because the issue has resolved itself. I've been preparing new machines for each of our staff and on each machine I encountered the issue. However, it disappeared after ~ 1 day (or perhaps multiple Open/Close of Outlook), or perhaps some permissions propagation .... not entirely sure. So I have not been able to reproduce it for support.

    I have one more machine to go. So if it happens again I have a ticket open I can use to send them through details.

    Will let you know if I come up with something more concrete.

    Cheers

    Stephen

  • DanBlake Profile Picture
    on at

    Thanks, Steven. I have also submitted a service request. I'll follow up here if we get any information or a resolution. Also, I found that if we disable "Use correlation to track email conversations" in System Settings, the error no longer occurs. The downside to this workaround is that users have to track each individual email manually using the Outlook client, even within the same thread.

  • LukeHendo Profile Picture
    195 on at

    Yes, this stops the error message, but it is hardly a resolution as tracking each email individually is a real pain.

    It is happening with us when two machines are logged into the same user account and emails are being tracked.

    Downgrading to outlook client 0.1 does stop the error.

    Dan and Stephen, have you had any response from service request?

  • DanBlake Profile Picture
    on at

    Luke,

    Our service request is still open. We have had some conversations with support but no resolution as of yet.  They are still investigating the issue based on the client trace logs we provided.  I am convinced that it is a client-side bug in the Outlook plugin.

    I agree that the workaround to disable "use correlation..." is not a great workaround.  Additionally, I found that while this greatly reduced the occurrence of the error, it still does occur.  However, until we get a fix, this is the best option we have available.

    You mentioned downgrading to the 0.1 client.  Our installed versions (the version where we are experiencing this error) are:

    Server: CRM Online version 8.0.1.348.  (We haven't updated to the 2016 Spring Release (Update 1) yet.)

    Client: CRM for Outlook with 0.1 update

    So, we are using 0.1 on the client and seeing the error.  However, we are using CRM Online, not On-Prem.

    I will report back if we get a resolution or useful information to report.

    -Dan

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans