Skip to Content
1
Jan 27, 2020 at 04:13 PM

oData V2 submitChanges success parameter not filled

417 Views

Hi Experts,

I' m using oData v2 batch to make a sequence of post to the backend. In the chrome developer tool I can see the reponse from the backend but this doesnt seem to available in the oData parameter of the success method of the submitchange. The success message is called its only that the parameter doesnt have any value. What I am doing wrong?

var oModel = new ODataModelv2({
	serviceUrl: "xxxx",
	json: true,
	useBatch: true,
	tokenHandling: false,
	disableHeadRequestForToken: true,
	defaultUpdateMethod: "MERGE"
});
oModel.setDeferredGroups(["itemsParentDefGrp"]);
oModel.create("/xxxx", oItem);
oModel.update("/xxxx", oItems);
oModel.setUseBatch(true);
oModel.submitChanges({
	success: function (oData) {
		sap.m.MessageToast.show(oData.toString());
	},
	error: function (oError) {}
});