Created
November 18, 2018 09:07
-
-
Save choudharymanish8585/27f326ae18f90baad55546edbaed0d61 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
({ | |
/** | |
* This function gets object list | |
* @author - Manish Choudhari | |
* */ | |
getObjectList : function(component) { | |
var action = component.get("c.getObjects"); | |
action.setCallback(this,function(response) { | |
var state = response.getState(); | |
if (state === "SUCCESS") { | |
component.set("v.allObjects", response.getReturnValue()); | |
component.set("v.filteredObjects", response.getReturnValue()); | |
} | |
}); | |
$A.enqueueAction(action); | |
}, | |
/** | |
* This function gets record list | |
* @author - Manish Choudhari | |
* */ | |
getRecordList : function(component, selectedObject) { | |
var action = component.get("c.getRecords"); | |
action.setParams({ | |
'objectName' : selectedObject | |
}); | |
action.setCallback(this,function(response) { | |
var state = response.getState(); | |
if (state === "SUCCESS") { | |
component.set("v.records", response.getReturnValue()); | |
} | |
}); | |
$A.enqueueAction(action); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment