Skip to content

Instantly share code, notes, and snippets.

@keirbowden
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save keirbowden/aa88ac8c8f33d065f143 to your computer and use it in GitHub Desktop.
Save keirbowden/aa88ac8c8f33d065f143 to your computer and use it in GitHub Desktop.
JavaScript Helper for the Lightning App to Render Cases
({
getCases : function(component) {
var action = component.get("c.GetRecentCases");
var self = this;
action.setCallback(this, function(a) {
try
{
var cases=a.getReturnValue();
console.log('Result = ' + JSON.stringify(cases));
component.set("v.cases", cases);
}
catch (e)
{
alert('Exception ' + e);
}
});
$A.enqueueAction(action);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment