You need to sign in to do that
Don't have an account?
Krishna Prasad K P
Understanding the record locking.
I have 4 questions on record locking:
- Does attaching a file lock the parent record?
- I have a Master object record M1 and detail records D1 and D2. When I update D1 and D2, I understand that the M1 gets locked. I have 2 sub questions on it.
- I am updating D1 and D2, So the execution order goes through Before update Trigger, actual DML, after update trigger, Workflow field updates etc. So my question is, does M1 get locked from beginning to end till WF field update, or only while the actual update on D1 and D2 into DB (means after BEFORE UPDATE trigger and before AFTER UPDATE trigger)?
- Probably related to Q 2.1: In my AFTER UPDATE trigger context of D1 and D2 update, I wanted to insert one more detail record D3 under the same master M1. Will I get "unable to lock row : M1" error ?
- In my AFTER UPDATE trigger context on child object can I update some field of the master record?
Refer these links
http://www.asagarwal.com/2426/how-to-lock-records-in-salesforce
https://success.salesforce.com/ideaView?id=08730000000BrZOAA0
http://blog.jeffdouglas.com/2010/03/09/locking-sobject-records/
Thank you.