Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
companyProfileHelper
({
fetchCompanyProfile : function(component,event,helper) {
var action=component.get("c.getAccountDetails");
action.setParams({
"rec_id": component.get("v.recordId")
});
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
if(response.getReturnValue() == 'Enter website to see the company profile'){
component.set("v.err",'Enter website to see the company profile');
}else{
var data = JSON.parse(response.getReturnValue());
component.set("v.details",data);
component.set("v.err",'');
}
}
});
$A.enqueueAction(action);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment