Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
({
doInit : function(component, event, helper) {
var action = component.get("c.getsendObjectDetails");
action.setParams({ objName : component.get("v.objName") });
action.setCallback(this, function(response){
var state = response.getState();
if (state === "SUCCESS") {
//console.log("SUCCESS");
component.set("{!v.sObjects}", response.getReturnValue());
}
else if (state === "ERROR") {
var errors = response.getError();
if (errors) {
if (errors[0] && errors[0].message) {
console.log("Error message: " +
errors[0].message);
}
} else {
console.log("Unknown error");
}
}
});
$A.enqueueAction(action);
},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment