Monday, November 14, 2016

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 :
1Account [] accts = [SELECT Id FROM Account LIMIT 2 FOR UPDATE];

No comments:

Post a Comment