function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Steve BerleySteve Berley 

no callback if apex does dml

I have lightning action button that calls a server-side process - JS controller code below.

My problem is that the callback only fires if the apex method performs no DML calls.  Otherwise, it never fires.
 
buttonClick : function(component, event, helper) {
    var action = component.get("c.apexCall");
    action.setParams({"contactID": component.get("v.recordId")});
    
    action.setCallback(this, function(response){
        console.log('in callback...');
    });
    $A.enqueueAction(action);
}

I'm new to Lightning - please help me understand how to get around issue?

Thanks,

Steve 
Alain CabonAlain Cabon
Hi Steve,

You should also post your controller source code (for c.apexCall with what DML statements exactly?) .

The more you give details, the more people could help you here.

Regards