Created
January 6, 2019 07:16
-
-
Save xgeek-net/f1c2aa689f35fd7711bb55eca46a6f94 to your computer and use it in GitHub Desktop.
SampleAuraController Lightning Component
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
({ | |
'showAccount' : function(cmp, ev, helper) { | |
var action = cmp.get('c.findAccount'); | |
action.setParams({ accountId : '001xxxxxxxxxxxx' }); // your parameters | |
action.setCallback(this, function(res) { | |
var state = res.getState(); | |
if(state === 'SUCCESS') { | |
console.log('From Server-Side: ' + res.getReturnValue()); | |
} | |
else if(state === 'ERROR') { | |
console.error('ERROR: ' + res.getError()); | |
} | |
}); | |
$A.enqueueAction(action); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment