Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics AX (Archived)

Cannot edit a record in [insert table name]. The record already exists.

Posted on by

One of my customers recently reported an error when using my customization: 

Cannot edit a record in my custom table (MyCustomTable).  The record already exists.

We are unable to debug on the customer's system so I'm not exactly sure what caused this error but I'm curious if anyone has ever seen this before.  The error message doesn't make sense to me.  It would make sense to get an error that you could not INSERT a record in my custom table because the record already exists but what does that even mean that you cannot EDIT a record that already exists?

 

*This post is locked for comments

  • Greg's Mom Profile Picture
    Greg's Mom on at
    Re: Cannot edit a record in [insert table name]. The record already exists.

    Thanks a lot for the reply, Joris.  That makes perfect sense.  

  • Verified answer
    Joris dG Profile Picture
    Joris dG 17,775 on at
    Re: Cannot edit a record in [insert table name]. The record already exists.

    It is likely you are updating the record's primary key, which makes it conflict with an existing record.

    Let's say you have a table with 1 column which is the primary key, called "ID". Your table contains 2 record, with ID "a" and ID "b". If you now select the row with ID "b" and updated the ID column to "a" and call update, you will get this error message.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans