cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error like ODataModel.js:6 Uncaught (in promise) undefined

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

0 Kudos

Hi,

Anyone found the solution for this?

Thanks

Pavan

Accepted Solutions (0)

Answers (3)

Answers (3)

robert_hunger
Participant
0 Kudos

I think you changed the OData model in the backend system. You just have to synchronize the data model (e.g. Manifest.json -> Data Sources) and empty the browser cache. Then it should work.

Former Member
0 Kudos

hi please share the solution,am also facing same issue.

daniel_erdmann3
Discoverer
0 Kudos

I have the same error.