Skip to content

Instantly share code, notes, and snippets.

@arun12209
Created July 7, 2019 05:11
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/cfca5d32df6d50d102766439462140f7 to your computer and use it in GitHub Desktop.
Save arun12209/cfca5d32df6d50d102766439462140f7 to your computer and use it in GitHub Desktop.
LightningMapCmpController
({
doInit : function(component, event, helper) {
let action = component.get("c.fetchContacts");
action.setParams({
"accountId":component.get("v.recordId")
});
action.setCallback(this,function(response){
let state = response.getState();
if(state =='SUCCESS'){
let result = response.getReturnValue();
console.log('Result returned: ' +JSON.stringify(result));
component.set("v.conObj",result);
var contacts = component.get("v.conObj");
helper.loadMap(component,event,helper,contacts);
}else{
console.log('Something went wrong! ');
}
});
$A.enqueueAction(action);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment