You need to sign in to do that
Don't have an account?

no response for action.setCallback
Hello,
i have problem with my lightning code.
i am using this action in a save function:
It is actually called successfully (i can see the apex debug messages), but the javascript debugs are not showing in the developer console of my browser.
Note: 120 is just a return for testing.
Any advise about this?
thanks
Peter
i have problem with my lightning code.
i am using this action in a save function:
var getDateDifference = cmp.get('c.getDateDiff'); getDateDifference.setParams({deliveryDate: soldByDate.get('v.value')}); getDateDifference.setCallback(this, function(respDate){ console.debug("DATE DIFF " + respDate.getState()); console.debug("DATE DIFF " + respDate.getReturnValue()); }); $A.enqueueAction(getDateDifference);it calls this Apex-Method:
@AuraEnabled public static Integer getDateDiff(String deliveryDate){ system.debug('divdate' + deliveryDate); system.debug('date ' + system.today()); return 120; }
It is actually called successfully (i can see the apex debug messages), but the javascript debugs are not showing in the developer console of my browser.
Note: 120 is just a return for testing.
Any advise about this?
thanks
Peter
There are two possiblity
getDateDifference.setParams({deliveryDate: soldByDate.get('v.value')});
In this line you should give deliveryDate in double qoute like below:
getDateDifference.setParams({"deliveryDate": soldByDate.get('v.value')});
I tried and working ine for me
Tahnks
Niraj
All Answers
Try like below, regards
There are two possiblity
getDateDifference.setParams({deliveryDate: soldByDate.get('v.value')});
In this line you should give deliveryDate in double qoute like below:
getDateDifference.setParams({"deliveryDate": soldByDate.get('v.value')});
I tried and working ine for me
Tahnks
Niraj