Thursday, January 17, 2019

Dynamics 365 CE OnPrem: Enable Language: Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Report'. Cannot insert duplicate key in object 'dbo.ReportBase'


I have experienced an issue (Duplicate Record) while enabling language in Dynamics 365 Customer Engagement V9 OnPrem Organization (Vanilla).





The Log file showed error Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Report'. Cannot insert duplicate key in object 'dbo.ReportBase'
Error msg:

Unhandled Exception: System.ServiceModel.FaultException`1[[Microsoft.Xrm.Sdk.OrganizationServiceFault, Microsoft.Xrm.Sdk, Version=9.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]]: Cannot insert duplicate key exception when executing non-query: System.Data.SqlClient.SqlCommand Exception: System.Data.SqlClient.SqlException (0x80131904): Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Report'. Cannot insert duplicate key in object 'dbo.ReportBase'. The duplicate key value is (5c4369e7-3c1a-e911-b800-00155d43e6ac, 0, Jan 17 2019 9:47AM).

I tried find the solution into Dynamics community; I identified that its being causing by known issues in Dynamics 365 CE V 9.0.2.3034 and will be resolved in upcoming Microsoft release. 

After digging further into forum details i found a resolution in CRM Patch "CRM9.0-Server-KB4458112-ENU-Amd64", (not officially announced yet). 

https://community.dynamics.com/crm/f/117/t/300064?pi61802=4#responses


After applying the KB4458112 (V 9.0.2.3041), I was able to enable the language and it worked fine. 

I will recommend to install the patch on Dev/Test Dynamics 365 Onprem instance before the production deployment. 

Thumbs up if it works for you. 

Happy Dynamics 365 CE!!!!

Cheers, 
Adnan

2 comments:

  1. Thank you very much for sharing this. I was facing the same issue and was not able to get any solution.
    thumbs up for you for posting the solution

    ReplyDelete
  2. However, we couldn’t give them good marks in this division end result of|as a outcome of} many of their crypto-exclusive titles aren’t optimized for 코인카지노 mobile betting. Once you get past this hurdle, you’ll be able to|be capable of|have the flexibility to} make your deposits and receive your winnings through Bitcoin, Ethereum, Litecoin, Bitcoin Cash, Dogecoin, and Tether . That stated, they make it simple for new spanking new|for brand new} sign-ups to buy crypto instantly via their web site. If you’re up for it, ought to use|you have to use} your credit card or any variety of e-wallets to spend money on|put money into} some Bitcoin. However, we applaud their dedication course of|in path of} mobile compatibility – their 365 casino provisions and 23 sports activities betting classes are simply accessible via their optimized web site.

    ReplyDelete