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
Ken_KoellnerKen_Koellner 

UNABLE_TO_LOCK_ROW, any way to get more info?

The documentation says this could be a dealock or a timeout.

 

Is there any way to get more info and find out which it is, timeout or deadlock?

 

Is there any way to find out what object had the locking problem?

 

I'm inserting into Opportunity and then OpportunityLineItem.  I would like to try and find out what the problem is.  Is a parent record locked?  Is it just timing out?  I would not think that any other process is trying to update the record I just inserted.

 

geetageeta

Do you have multiple threads inserting the child records? You typically see row lock errors when multiple threads insert/update records in child object with common parents.