I am trying to call a oData service and read the value of a field into a variable. But i am getting nothing into the variable even though i can see from the Trace that oData is returning data allright.
var oGeneralModel = this.getOwnerComponent().getModel("GeneralModel"); oGeneralModel.read("/GeneralDataSet('xxx')", null); var username = oGeneralModel.getData("/GeneralData/Uname");
I am reading a single Entity and need the value of "GeneralData->Uname" into variable "username"
What is wrong?