Tuesday, January 28, 2014

How can you lock record using SOQL so that it cannot be modified by other user

How can you lock record using SOQL so that it cannot be modified by other user

we will need “FOR UPDATE” clause of SOQL.
Sample :
Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];


No comments:

Post a Comment