HI Team,
I am trying to to call a function from backend(Odata) From Front End SAP Ui 5:
var urlPram=oEvent.getSource().getBindingContext().getProperty("Id");
this.getOwnerComponent().getModel().callFunction("/AddToCart",
{ method: "POST", urlParameters:
{ ID: urlPram },
success: function(oData, oResponse){ alert("Hi") },
error: function(oData, oResponse){ alert("Hello") }
});
But I am getting an error like:ODataModel.js:6 Uncaught (in promise) undefined
I am trying using eclipse to develop SAP UI 5 application (able to get all the back end data by entity set)
Please kinldy help me in this