+ Start a Discussion

Flow: UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record

I have a flow that is sometimes generating
the UNABLE_TO_LOCK_ROW: unable to obtain exclusive access to this record.  I don't know if there is something I can update to my flow to ignore any apex batch jobs etc or to change my flow.  Below is the update that is throwing the error.

User-added image
Can a Contact formula in an apex class SOQL for an update cause this error?
mukesh guptamukesh gupta
Hi Bob,

For consistent data, when a record is being created or updated, it is locked so that other users cannot update the record.

FOR UPDATE keyword in SOQL helps us to lock the records from being updating from another request. Sample Code

Locking Issue may happen due to Skewing issue - http://www.infallibletechie.com/2019/11/salesforce-data-skew.html

Salesforce Reference Link - https://help.salesforce.com/articleView?id=000338933&type=1&mode=1 (https://help.salesforce.com/articleView?id=000338933&type=1&mode=1)

if you need any assistanse, Please let me know!!

Kindly mark my solution as the best answer if it helps you.

Hi Mukesh,

Thank you for helping.  It appears that the Status field on Service Appointments is the issue. Since it is a standard field. I can't see where else this field is used in any other automation. Is there any way to see where this field is being used by querying flows or apex classes, etc. Or would adding a default variable to the below screenshot an option.

I'm not sure how to stop this from happening, but it is frustrating my community and internal users. 

User-added image

Quick Question   Do formula field ever play apart on the row locking error?