Guest User

Untitled

a guest
Jan 19th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.16 KB | None | 0 0
  1. Visualforce.remoting.Manager.invokeAction(
  2. '{!$RemoteAction.VueDataTableExampleController_test.addToTerritory}', JSON.stringify(account),
  3. function (result, event) {
  4. if (event.status) {
  5. console.log('event.status', event.status);
  6. } else if (event.type === 'exception') {
  7. console.log('exception');
  8. } else {
  9. console.log(event.type);
  10. }
  11. }, {
  12. escape: true
  13. }
  14. );
  15.  
  16. @RemoteAction
  17. public static void addToTerritory(String accountToUpdate) {
  18. Account updatedAccount = (Account)JSON.deserialize(accountToUpdate, Account.class);
  19. // update updatedAccount;
  20. if(vAddToTerrMessage == 'AlignementBlock')
  21. {
  22. ApexPages.addmessage(new ApexPages.message(ApexPages.severity.WARNING,GAS_Add_To_Terr_Block_Message));
  23. // return null;
  24. }
  25.  
  26. }
Add Comment
Please, Sign In to add comment