cancel
Showing results for 
Search instead for 
Did you mean: 

Type error: Cannot read properties of undefined ( reading 'read' )

Former Member
0 Kudos
15,657

Hi Team,

I am facing an issue in my custom UI5 application while reading the data from backend for my Read query -

onInit: function () {

this.oModel = this.getOwnerComponent().getModel();

this.oCustTable = this.getView().byId("idCustTable");

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

success: function (odata) {

var CustJsonData = new JSONModel(odata.results);

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

}

});

},

img-20221208-wa0031.jpg

manifest1.jpgmanifest2.jpgmanifest3.jpgmanifest4.jpg

Please advise.

Regards -

Meenakshi

View Entire Topic
AshishAnand
Product and Topic Expert
Product and Topic Expert
0 Kudos

Hi meenakshi.raina,

This could be because this.getOwnerComponent().getModel() is returning undefined. Kindly check if it helps 🙂

Thanks and Regards

Ashish

Former Member
0 Kudos

Hi ashish

Yes, that's correct. But I have defined my service in the manifest file. img-20221208-wa0032.jpg

Do I need to do more?