Created
March 24, 2018 00:10
-
-
Save paustint/0238f42fa39b23b1641b0b6a6b68fd9f to your computer and use it in GitHub Desktop.
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
({ | |
// example helper function | |
getQuoteLines: function(component, quoteId, quoteLineId) { | |
return new Promise(function (resolve, reject) { | |
var action = component.get("c.getQuoteLines"); | |
action.setCallback(this, function(results) { | |
utils.log('getQuoteLines() results', results); | |
if(results.getState() === 'SUCCESS') { | |
utils.log('results:', results.getReturnValue()); | |
resolve(results.getReturnValue()); | |
} else if (results.getState() === 'ERROR') { | |
utils.log('getQuoteLines() ERROR', results.getError()); | |
$A.log("Errors", results.getError()); | |
reject(results.getError()); | |
} | |
}); | |
$A.enqueueAction(action); | |
}); | |
}, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment