Dears,
I want to get entity set data to a variable using class "sap.ui.model.odata.v2.ODataModel" but always the variable value is undefined.
as I read OData v2 is loading data async but till now I don't have any clue how to load data into a variable.
//Creating the Model Instance
// "/destination/ODataTest" is defiended in my neo-app.json"
var oModel = new sap.ui.model.odata.v2.ODataModel("/destination/ODataTest/Northwind/Northwind.svc/");
var DataLoaded = oModel.read("/Products",
{success: function(){
MessageToast.show("Success");
}, error: function(e){
MessageToast.show("Failed");}
});
Thank you.