({
doInit : function(component, event, helper) {
helper.loadAffiliations(component, event);
},
editAffiliation : function(component, event, helper) {
helper.editRecord(component, event);
}
})
})
({
loadAffiliations : function(cmp, ev) {
var action = cmp.get("c.getAffiliations");
action.setParams({
"currentId": cmp.get("v.curRecordId")
});
action.setCallback(this, function(response) {
var state = response.getState();
if(state === "SUCCESS") {
var affiliations = response.getReturnValue();
cmp.set('v.numAf', affiliations.length);
cmp.set('v.afList', affiliations);
}
else if (state === "ERROR") {
console.log('errors', response.getError());
}
});
$A.enqueueAction(action);
},
editRecord : function(cmp, ev) {
var row = cmp.getEvent("editAffiliation");
console.log('row', row);
}
})
})
console.log('row', row);console.log('row', row);
logs out as nullnull
.