+ Start a Discussion
Ramakrishnan AyyanarRamakrishnan Ayyanar 

I need clear example about SOQL Record Locking : For Update

can any one explain me about locking statements.

when the record is locked.
when the record is released.
VPROKVPROK
If I understand correct, the record is locked when the querry is made and gets released after the whole transaction is completed.
Here is the link:
http://www.salesforce.com/us/developer/docs/apexcode/Content/langCon_apex_locking_statements.htm
Amit BangadAmit Bangad
Hi Ramakrishnan,

When in Query,you use 'FOR UPDATE' the record will be locked till transaction is complete for any other user except you. And ofcourse it will get released after transaction is complete !

Thanks
AMit
Ramakrishnan AyyanarRamakrishnan Ayyanar
Thanks you Amit and VPROK