An OData service (V2) contains multiple navigation properties as following:
ClassNum: "ZPM_TEST_01" ClassNumDescr: "ZPM_TEST_01" ClassType: "001" InternalClass: "0000000130" ValidFrom: Tue Sep 04 2018 02:00:00 GMT+0200 (Central European Summer Time) {} ValidUntil: Fri Dec 31 9999 01:00:00 GMT+0100 (Central European Standard Time) {} to_IClassHeaderVh: {__deferred: {…}} to_IClassVh: {__deferred: {…}}
As you can see above, to_IClassHeaderVh
and to_IClassVh
are navigation property.
The code, that requested the OData service:
oModel.read(sUri, {
success: function (oData) {
},
error: Util.showErrorClassNotFound
});
How can I get the URL from navigation property via code? I could get it via the object as following:
oData.to_IClassVh.__deferred.uri
But I do not know if it is the right way or not.