Created
November 23, 2018 07:35
-
-
Save simpluslabs/39625238b6fc72629d3e29cdd969d8d1 to your computer and use it in GitHub Desktop.
This file contains 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
({ | |
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