Skip to Content
-2
Dec 09, 2022 at 11:58 AM

Uncaught TypeError: Cannot read properties of undefined (reading 'getView')

1120 Views

Hello All,

I have created a custom UI5 application.

But while reading the data through the following query, I am getting an error- “Uncaught TypeError: Cannot read properties of undefined (reading 'getView') at success”

this.oModel.read("/ET_Deal_CustListSet", {

success: function (odata) {

var CustJsonData = new JSONModel(odata.results);

this.getView().setModel(CustJsonData, "ET_CustList");

}

});

I can view the data in Network tab - $metadata(status: 200), $batch(status: 202). But this odata query results in an error.

Please advise.

Regards- Meenakshi