Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
({
getData : function(component, event) {
console.log('inside init getData');
var recId = component.get("v.recordId");
var dataAction = component.get("c.getAccount");
dataAction.setParams({accountId : recId});
dataAction.setCallback(this, function(response){
var state = response.getState();
if(state=='SUCCESS')
{
var retVal = response.getReturnValue();
console.log('retVal---'+retVal.Name);
component.set("v.account",retVal);
}
});
$A.enqueueAction(dataAction);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.