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

Community site session details

Session Id :
Microsoft Dynamics 365 | Integration, Dataverse...
Unanswered

A record with matching key values already exists.

(0) ShareShare
ReportReport
Posted on by 10

Can anyone please help with this error, As this error occured in a power automate flow while updating a row in entity step.

"error": {

    "code""0x80040237",

    "message""A record with matching key values already exists.",

    "@Microsoft.PowerApps.CDS.ErrorDetails.SqlExceptionMessage""Violation of PRIMARY KEY constraint 'cndx_PrimaryKey_Opportunity'. Cannot insert duplicate key in object 'dbo.OpportunityBase'. The duplicate key value is <redacted>.",

    "@Microsoft.PowerApps.CDS.HelpLink""http://go.microsoft.com/fwlink/?LinkID=398563&error=Microsoft.Crm.CrmException%3a80040237&client=platform",

    "@Microsoft.PowerApps.CDS.InnerError.Message""Cannot insert duplicate key."

I have the same question (0)
  • Parag Chapre Profile Picture
    12,254 Most Valuable Professional on at
    RE: A record with matching key values already exists.

    Hi there,

    Can you please give more details? For example, what steps are you following and when you are getting an error?

  • Shabbir Profile Picture
    240 on at
    RE: A record with matching key values already exists.

    Please check this "cndx_PrimaryKey_Opportunity" key on the opportunity table what columns are including. And then filter the table on this columns with the values you inserting from Power Automate.

    Based on the error, the record should already exists. And then make sure the record you are trying to insert through power automate are using those exact values or not.

  • NathanBetters Profile Picture
    37 on at
    A record with matching key values already exists.
    I have the same issue when trying to update the "Business Unites" default table for CRM, when my flow inserts a new record into the table it works just fine, but when I am trying to update a record it throws this error, which makes no sense because we are trying to UPDATE an existing record, so obviously the primary key should already exist..

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Microsoft Dynamics 365 | Integration, Dataverse, and general topics

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 109

#1
Sahan Hasitha Profile Picture

Sahan Hasitha 109

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 71 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans