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
Ek KanusEk Kanus 

Salesforce Parent Locking 'UNABLE TO LOCK ROW'

Does salesforce lock Account Record when user try to update/create following child objects -

    AccountTeamMember

    Opportunity Line Item (Does sfdc lock opportunity here as well?)

    Task

    Contact

    OpportunityTeamMember (Does sfdc lock opportunity here as well?)

Is this applicable to only Master Detail relationships ? (Not Lookups)
Vinita_SFDCVinita_SFDC
No, the error doesn't occur if you try to update/create above child objects. This error occurs if more that one DML operation is prformed on a record at the same time.

Please refer following link:

http://kb.internetcreations.com/articles/Troubleshooting/UNABLE-TO-LOCK-ROW-unable-to-obtain-exclusive-access-to-this-record/?l=en_US&fs=Search&pn=1

http://salesforce.stackexchange.com/questions/8058/unable-to-lock-row-error-while-running-all-apex-test-classes
shrish mysoreshrish mysore
Yes, According to salesforce they also employ record-level locking to prevent inconsistencies in the data while updating records. In addition to taking this standard precaution, developers and administrators should know that when they are updating child records in Salesforce, the system locks the parent and the child records to prevent inconsistencies, such as updating a child record whose parent has just been deleted in another thread.

Refere this link : 
https://developer.salesforce.com/docs/atlas.en-us.draes.meta/draes/draes_object_relationships_record_level_locking.htm