Skip to Content
0
Nov 01, 2019 at 04:57 AM

controller method not invoked inside odata post call

92 Views

Hi Experts,

I am not able to call any custom function inside the oData post success call. Please check if you would have seen similar case by any chance.

Example code :

Controller code

onSubmit: function () {
var that = this;
that.onInit();

}

oModel.create("/Entity", postData, {
success: function (oRetrievedResult) {
var that=this;
lv_BusyDialog.close();
var msg = 'Success!';
MessageToast.show(msg);
that.onSubmit(); // This onSubmit is getting not called here.
},
error: function (oError) { /* do something */
lv_BusyDialog.close();
var msg1 = 'error';
MessageToast.show(msg1);

}

Please suggest if you have faced similar case by any chance.

Thanks and Regards,

RK