Created
September 21, 2017 01:37
-
-
Save karanrajs/6065036930c593766e61c23727719eda 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
getLightningTableData : function(component) { | |
var sColumn = component.get("v.fields"); | |
var sObject = component.get("v.object"); | |
var action = component.get("c.getsObjectRecords"); | |
action.setParams({ | |
ObjectName : sObject, | |
fieldstoget : sColumn | |
}); | |
action.setCallback(this,function(response){ | |
var state = response.getState(); | |
if(state == 'SUCCESS'){ | |
var rtnValue = response.getReturnValue(); | |
component.set("v.mycolumn",rtnValue.tableColumn); | |
component.set("v.mydata",rtnValue.tableRecord); | |
} | |
}); | |
$A.enqueueAction(action); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment