I have a lightning component which is calling server-side apex code. Thes server-side code gets executed properly but setCallBack() function is not getting executed.
<aura:component implements="force:lightningQuickActionWithoutHeader, force:hasRecordId" controller = "serverController" >
<lightning:button variant="brand" label="Yes" title="Yes" onclick="{! c.overwriteData }"/>
</aura:component>
controller
overwriteData: function(component, event, helper) {
var action = component.get("c.renew");
action.setParams({
"RecordId" : component.get("v.recordId")
});
action.setCallback(this, function(response) {
console.log("Response -- " + response.getReturnValue());
});
// Send action off to be executed
$A.enqueueAction(action);
helper.closeDialogue();
}
One thing I have noticed that the apex function gets executed after controller function execution complete (I checked developer console for that) and the console log or alert in set callback also do not get executed.