Skip to Content
Oct 16, 2019 at 10:15 AM

How to pass odata service data to View passing key


Hi I have a service and i want to bind that service to View.

I am trying var oMod = this.getOwnerComponent().getModel();"/AgreementReqHeaderSet('F000028993')", { success: function (oData) {

var oJsonModel = new JSONModel(); oJsonModel.setData(oData);

this.getView().setModel(oJsonModel,"Agr"); }.bind(this), error: function (oError) {"Read Failed"); }


getting error

Uncaught TypeError: Cannot read property 'read' of undefined

Please guide me . Am i using correct approach ? Please correct if any ...