Skip to main content
Hi Guys - I'm using a 'For Update' in my SOQL query in awebservice method and i'm getting an error message "Error: Compile Error: SObject type does not allow locking rows at line ". Can someone let me know whats the problem here !!!

My Code :

*****

global class recordLocking { 

    webService static Boolean lockmyrecord(String idUser) {

        Boolean val = false;

        User obj = null;

        obj = [SELECT Id FROM User WHERE Id = :idUser LIMIT 1 FOR UPDATE]; 

        return (val);

    }

}

*****

 
2 件の回答
0/9000