function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Tommy Sunderland 16Tommy Sunderland 16 

Best way to determine changes made by another user when a record is trying to save? Collision Detection analysis.

Multiple users are getting an error message when trying to save an Opportunity. The message reads "The record you were editing was modified by XYZ user during your edit session". I'm familiar with this error and why it fires when two people are actively editing a record (Collision Detection), but the odd thing is that the other Users were NOT actively editing the same record at the same time. I'm assuming that something in the background is causing this error (Workflow, Process Builder, Flow, etc.), but does anyone know the best way to check this? Is there a way to determine if one of these elements threw the error? Or is there a way to see that user's log history for that time period?

User-added image
 
Dev_AryaDev_Arya
Hi Tommy,

According to the salesforce documentation
"If there is some action (e.g. trigger, workflow, flow, etc) that changes that record while a user is currently editing it, Collision Detection will throw this error message.
This also occurs if one User is editing but another User is just looking at the record, and then the User just looking at the record does not refresh the page before starting their edits.
In the Salesforce Classic UI, this error is only thrown when a different user edited the record.
In the Salesforce Lightning Experience UI, this error is thrown when any user (including the logged in user) edited the record." --
https://help.salesforce.com/articleView?id=000006771&type=1

Now, I assume you have already gone through the link. If you see a pattern in the error message with respect to the user name, for ex Tommy in the given screen shot, I would enable the debug logs for this user and see whats happening in the background. Also I will look for all the background processed running the particular object. 

Cheers,
Dev
pushpendra yadav 18pushpendra yadav 18
Hi I want to know how we can show this message in classic when two user editing same record.
Please help.