Skip to content

Instantly share code, notes, and snippets.

@tushar30
Last active September 4, 2018 06:21
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 tushar30/5b76a5f7933054b32e751e605ada7ab7 to your computer and use it in GitHub Desktop.
Save tushar30/5b76a5f7933054b32e751e605ada7ab7 to your computer and use it in GitHub Desktop.
({
doInit : function(component, event, helper) {
var action = component.get("c.fetchMapData");
action.setCallback(this, function(response) {
var state = response.getState();
if (state === "SUCCESS") {
var custs = [];
var conts = response.getReturnValue();
for(var key in conts){
custs.push({value:conts[key], key:key}); //Here we are creating the list to show on UI.
}
component.set("v.oppAccountList ",custs);
}
});
$A.enqueueAction(action);
}
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment