Hi Justin,
OData remove method doesn't have 'data' argument, It should be:
var id = self.getView().byId("i1").getValue(); var str = "/Products("+id+")"; var oModel = this.getView().getModel("products"); oModel.remove(str, { success : function(oData, oResponse){ // Success console.log(" Deleted Successfully" ); alert(" Deleted Successfully" ); }, error : function(oError){ // Error console.log(" Delete failed" ); alert(" Delete Failed" ); } });
API: JsDoc Report - SAP UI development Toolkit for HTML5 - API Reference - sap.ui.model.odata.ODataModel
Regards,
Sai Vellanki.