Skip to Content
0
Apr 19, 2017 at 11:37 AM

SAP UI5 Delete operation not working

692 Views

Hello there,

I've created an UI5 application with OData service, I am able to update the data which entered on application to backend via OData service. but couldn't delete the data in the same way. Getting below error message in log.

The Data Services Request contains SystemQueryOptions that are not allowed for this Request Type

below is my code: 
		deleteEntry: function(oEvent) {
			var oModel = oEvent.getSource().getModel();
			var oBindingContext = oEvent.getSource().getBindingContext();
			var sPath = oBindingContext.getPath();


			oModel.remove(sPath, {
				success: function() {
					MessageToast.show("Delete Success");
				},
				error: function() {
					MessageToast.show("Delete Failed");
				}
			});
			oModel.refresh();
		}