Hello,
I have designed and OData service and SAPUI5 Application to perform CRUD operations.
During DELETE operation, everything works fine when tested in Gateway Client. But when tested from SAPUI5 it is Gateway throwing 500 error, though row is deleted successfully. Below are my codes. Please guide me here.
Note : I have a date field in table which is marked 'nullable' in EntityType
var oTable = this.getView().byId("idProductsTable");
var oModel = oTable.getModel();
var aBatchtoDelete = [];
var oSelectedItems = oTable.getSelectedItems();
var sPath = oSelectedItems[0].getBindingContext().sPath;
oModel.remove(sPath,null,function(){
MessageToast.show("Deleted Successfully");
oModel.refresh();
},
function(errData) {
MessageBox.show(
"Error occured during deleting records" ,{
icon: sap.m.MessageBox.Icon.ERROR,
title: "Dear User",
styleClass: "sapUiSizeCompact"
}
);}
);
