Skip to main content
Sadish Kumar Sankaran (DataSirpi) 님이 #Apex에 질문했습니다
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