Advertisement
Guest User

Untitled

a guest
Sep 3rd, 2015
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. global class checkbox{
  2. webservice static void check(Id localId) {
  3. Account acc = new Account();
  4. system.debug(localId);
  5. system.debug('localId');
  6. acc.Id = localId ;
  7. acc.Validated__c = true;
  8. update acc;
  9. }
  10. }
  11.  
  12. {!REQUIRESCRIPT("/soap/ajax/30.0/connection.js")}
  13. {!REQUIRESCRIPT("/soap/ajax/30.0/apex.js")}
  14. alert("This is it!");
  15. if({!Account.Validated__c}=true)
  16. {
  17. sforce.apex.execute("checkbox","check",{localId:"{!Account.Id}"});
  18. alert("This is it!");
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement