Loading

Collision Detection error 'Changes cannot be saved' when a record is edited

Date de publication: Oct 13, 2022
Description

When editing a record*—via either a full edit or an inline edit for standard objects that use Aura record home—that another user, the same user in a different window (Lightning Experience only), or a background process has changed, users see this message:

 

Salesforce Classic:

"Changes Cannot Be Saved. The record you were editing was modified by User during your edit session."

 

Lightning Experience:

"This record was modified by (User) during your edit session. Make a note of the data you entered, then reload the record and enter your updates again."​

 

*Note that when making an inline edit for all custom objects and standard objects that use LWC record home, the record page automatically refreshes unless another user, the same user in another window, or a background process edits the same field to a different value. In this case, in lieu of the message above, users see a message showing them the conflicting field values. Users can choose the values to keep and save the record.

Résolution

The error message is displayed because of a security feature called Collision Detection

 

Collision Detection prevents a user from saving their record changes if the record they are editing has been modified since the edit began. This feature can't be disabled, and is in place to prevent possible data loss.

 

As the error message states, the record must be refreshed with updates manually entered and resubmitted in order for the changes to be saved and committed to the database.

Numéro d’article de la base de connaissances

000385614

 
Chargement
Salesforce Help | Article