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
Saikishore Reddy AengareddySaikishore Reddy Aengareddy 

UNABLE TO LOCK ROW - Question

Hello All-

 

If a contact is in process of updation by some process and at the same time cases associated to the contact are getting updated do we runinto locking issues?

 

As per docs it says that salesforce engine does the following

 

"

  1. First locks sObject parent records, then children.

"

so when a contact is getting updated does salesforce locks its associated cases?

Vinita_SFDCVinita_SFDC

Hello,

 

Records will not be locked in the scenario you provided. The consideration 'First locks sObject parent records, then children' is applicable when you are locking records through Apex code using For Update keyword. You are not supposed to lock child records first.

 

Refer: http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_locking_statements.htm