Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created December 28, 2019 16:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arun12209/52ca85b19ced89581f7d97d424178509 to your computer and use it in GitHub Desktop.
Save arun12209/52ca85b19ced89581f7d97d424178509 to your computer and use it in GitHub Desktop.
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