Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. FUNCTION_NAME : function (COMPONENT) {
  2.     var action = COMPONENT.get ('c.APEX_METHOD_NAME');
  3.     var recordId = COMPONENT.get ('v.recordId');
  4.     action.setParams ({
  5.         recordId: recordId // Apex param name : js var name
  6.     });
  7.    
  8.     action.setCallback (this, (actionResponse) => {
  9.         if (actionResponse.getState() === 'SUCCESS')
  10.             COMPONENT.set ('v.VAR_NAME', actionResponse.getReturnValue ());
  11.     });
  12.    
  13.     $A.enqueueAction (action);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement