Created
January 6, 2019 07:23
-
-
Save xgeek-net/7f6b4589018179a582acd1241e232d15 to your computer and use it in GitHub Desktop.
SampleAuraController.js 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 params = { accountId : '001xxxxxxxxxxxx' }; // your parameters | |
helper.sendRequest(cmp, 'c.firstRequest', params) | |
.then($A.getCallback(function(records) { | |
console.log('First From Server-Side: ' + records); | |
return helper.sendRequest(cmp, 'c.secondRequest', params); | |
})) | |
.then($A.getCallback(function(records) { | |
console.log('Second From Server-Side: ' + records); | |
})) | |
.catch(function(errors) { | |
console.error('ERROR: ' + errors); | |
}); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment