Skip to Content
Nov 17, 2016 at 09:26 AM

Batch request with submitChanges callback not called



I'm not expert on SAPUI5 but I already build Fiori Applications starting with the generated apps from SAP Webide. Maybe this is the reason I missed something, but this time I used the last version of FIORI template and it doesn't work as I expect.

Model is define in manifest.json :

		"models": {
			"i18n": {
				"type": "sap.ui.model.resource.ResourceModel",
				"settings": {
					"bundleName": "customerexpiredprices.i18n.i18n"
			"": {
				"dataSource": "mainService",
				"preload": true,
				"settings": {
					"defaultBindingMode": "TwoWay",
					"useBatch": true,
					"defaultCountMode": "Inline"

I want to delete multiple lines of an entity, but I want to do it in one request, this is why I used submitChanges to call the batch request and handle the succes or error event from the submitChanges :

		onDeletePress: function(oEvent) {

			var self = this;

			//Get Model
			var oModel = this.getView().getModel();

			//get selected lines
			var oSelectedContextPaths = this.byId("idMaterialList").getSelectedContextPaths();

			//Call delete for every lines
			if (oSelectedContextPaths.length === 0) {
			} else {
				oSelectedContextPaths.forEach(function(sPath) {
				}, oModel);

			this.getModel("detailView").setProperty("/busy", true);
				success: function(oData, sResponse) {"deleteConditionSuccess"));
					self.getModel("detailView").setProperty("/busy", false);
				error: function(oError) {
					self.getModel("detailView").setProperty("/busy", false);

Neither Success nor error functions defined in submitChanges method are called. Althought if I attach success function in the remove method it is called but for every lines.

I didn't expected this behavior, and i'm pretty sure I did something similar before and the succes was called from the submitChanges.

Please help...