Skip to content

Instantly share code, notes, and snippets.

@karanrajs
Created September 21, 2017 01:37
Show Gist options
  • Save karanrajs/6065036930c593766e61c23727719eda to your computer and use it in GitHub Desktop.
Save karanrajs/6065036930c593766e61c23727719eda to your computer and use it in GitHub Desktop.
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