D365FO – AX – How to resolve error “Cannot edit a record in ….. table (….). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record.”

This error usually occurs when you are trying to update a table, but the table was previously updated by another operation.

In this case it is advisable to call the reread () method of the table before updating.

Something like that :

journalTable.reread(); //--> try this before update method
journalTable.NumOfLines = any2int(journalTrans.recId);
journalTable.selectForUpdate(true);
ttsBegin;
journalTable.update(); //Update method
ttsCommit;

2 thoughts on “D365FO – AX – How to resolve error “Cannot edit a record in ….. table (….). An update conflict occurred due to another user process deleting the record or changing one or more fields in the record.”

  1. But what if this update is triggering from multiple places , can we use reread() at multiple places ?

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s