Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)
Answered

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

(1) ShareShare
ReportReport
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
    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
    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

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

🌸 Community Spring Festival 2025 Challenge Winners! 🌸

Congratulations to all our community participants!

Adis Hodzic – Community Spotlight

We are honored to recognize Adis Hodzic as our May 2025 Community…

Leaderboard > Microsoft Dynamics AX (Archived)

#1
Mohamed Amine Mahmoudi Profile Picture

Mohamed Amine Mahmoudi 100 Super User 2025 Season 1

#2
Community Member Profile Picture

Community Member 48

#3
Zain Mehmood Profile Picture

Zain Mehmood 6 Moderator

Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans