You need to sign in to do that
Don't have an account?
msreekm
UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record
In my afterinsert trigger on Lead , I want to update one of the fields in the current Lead records being inserted .I cannot do this in before insert since Iam dependent on the ID's of the newly inserted leads .
Getting the below error-
LeadTrigger: execution of AfterInsert caused by: System.DmlException: Update failed. First exception on row 0 with id 00QT0000005JQ05MAG;
first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []
any one encountered this issue?
All Answers
Can you paste your code here, then we can know how to use the @future.
Hi,
I am also facing the same issue. when i insert the records from parent to child object through batch apex class. i am getting error as 'First error: Insert failed. First exception on row 0; first error: UNABLE_TO_LOCK_ROW, unable to obtain exclusive access to this record: []'. But it is working fine in full sandbox which is copy of live. But i am getting error in live. How can i solve this error. Please help me.
Thanks,
Lakshmi
i am getting the same error what you mentioned can i know how you made it