Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- global class checkbox{
- webservice static void check(Id localId) {
- Account acc = new Account();
- system.debug(localId);
- system.debug('localId');
- acc.Id = localId ;
- acc.Validated__c = true;
- update acc;
- }
- }
- {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
- {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
- alert("This is it!");
- if({!Account.Validated__c}=true)
- {
- sforce.apex.execute("checkbox","check",{localId:"{!Account.Id}"});
- alert("This is it!");
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement