Skip to main content

Notifications

Power Platform integration forum
Unanswered

A record with matching key values already exists.

editSubscribe (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."

  • NathanBetters Profile Picture
    NathanBetters 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..
  • Shabbir Profile Picture
    Shabbir 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.

  • Parag Chapre Profile Picture
    Parag Chapre 12,194 Super User 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?

Helpful resources

Quick Links

Take the Community feedback survey!

Answer this brief 15-question survey about your Community experience…

Demystifying Copilot: Service Edition with Sundar Raghavan

Sundar answers more questions about Copilot for Service...

Dynamics 365 Business Central vs Finance and SCM

Take a look at the key differences between Business Central and…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,361 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 223,155 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,140

Featured topics

Product updates

Dynamics 365 release plans