Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3184

oData v2 submitChanges Error Handling

$
0
0

Hi,

 

I'm having trouble with the calback functions of the submitChanges() method JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.odata.v2.ODataModel

 

 

My code is as follows:

oDataModel.setUseBatch(true);
oDataModel.create("/SomeEntity", data, {    "changeSetId": "create"
});
oDataModel.callFunction("/SomeFunctionImport", {     "method": "POST",     "changeSetId": "function"
});
oDataModel.submitChanges(function(oEvent){     alert("Success");
}, function(oEvent){     alert("failure");
});

The submitChanges call goes through without any problems. The problem is that the error/success handlers doesn't get called. The documentation has the following note:

"Important: The success/error handler will only be called if batch support is enabled. If multiple batchGroups are submitted the handlers will be called for every batchGroup."

But I am setting the Model to use batch?

 

Using the model's event handlers doesn't work because they get called for every request that my model make, I only want to handle the specific submitChanges() calls.

 

Regards


Viewing all articles
Browse latest Browse all 3184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>