Hello ,
I'am getting the following error when opening in entity.
Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=7.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot insert duplicate key.Detail:
<OrganizationServiceFault xmlns:i="www.w3.org/.../XMLSchema-instance" xmlns="schemas.microsoft.com/.../Contracts">
<ErrorCode>-2147220937</ErrorCode>
<ErrorDetails xmlns:d2p1="schemas.datacontract.org/.../System.Collections.Generic" />
<Message>Cannot insert duplicate key.</Message>
<Timestamp>2017-11-21T15:41:34.6988216Z</Timestamp>
<InnerFault i:nil="true" />
<TraceText>
[Microsoft.Crm.ObjectModel: Microsoft.Crm.ObjectModel.GlobalActiveStagePlugin]
[bb48066e-f22f-412f-a530-91f72e4b859b: GlobalActiveStagePlugin]
</TraceText>
</OrganizationServiceFault>
Dynamics CRM ONPrem/2015
Thank you in advance
Best Regards,
David
*This post is locked for comments
So the roblem is that I have a null value in the column stageid ,which is a UI.
I just have to update the column.
Thank you for your help.
Best Regards,
David
Hi David,
Thanks for your prompt response.
I am appropriate.
Thanks
Mahesh
Hello Mahesh ,
I just found the resolution & the source of the problem,thank you for your invitation.
Best Regards,
David
Hello David,
As i review and my expertise seems i am able to fix the issue.
If you dont could you share with me TV access on private chat ? when we finish this problem you need to recommend me here.
Let me know if is that work or not
Thanks
Mahesh
Further investigation reveals that there is a problem with the BPF.
System.Data.SqlClient.SqlException (0x80131904): Can not insert a duplicate key row in the "dbo.BusinessProcessFlowInstanceBase" object with a unique index "cndx_Entity1_ProcessId". Duplicate key value: (b37bbcc7-2037-43b1-ad2f-3c218dc19c73, cf855bd1-64a7-e711-80c7-005056a03246, 1088).
I did a workaround by creating a new copy of the existing BPF and desactivating the old one.
but still dont have an explanation for the issues.
Any suggestions?
Best Regards,
David
Hi Hassan Ali ,
I did not see any alternate KEY defined.
BesT Regards,
David
Hi David
Have you defined an alternate key for your entity. Seems like the BPF or a plugin is trying to update the record with an alternate key that already exists.
Yes, when i desactivate it i can save the record.
But once activated ,i got the problem.
Any idea?
Best Regards,
David
Do you hv BPF in this entity?? If so check that is also
I forgot to mention that i have the error with only one record,others are fine.
Best Regards,
David
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,240 Super User 2024 Season 2
Martin Dráb 230,149 Most Valuable Professional
nmaenpaa 101,156