Forum Discussion
Odata V4 Error. Couldn't parse OData response result.
Hi MikeSmallwood,
Maybe you can try to add page parameter into request url or direct use odata as the parameter:
let
OdataFeed4 = "http://Meta-Ltp-Yoga.metaphorix.co.uk:7048/DynamicsNAV100/ODataV4/Company('CRONUS UK Ltd.')/Page/PurchaseOrders?$filter=Type eq 'Item'",
Source = OData.Feed(OdataFeed4)
in
Source
>>The URL string also works fine in the OData.Feed function under V3 (i.e. if I replace "ODataV4" with just "OData" in the URL).
BTW, I double check on newest version official document and not found v4/v3 exist in that query string.
Using Filter Expressions in OData URIs
Notice: if your data contains any privacy data, please do mask sensitive data before sharing.
Regards,
Xiaoxin Sheng
Hi Anonymous,
When NAV 2016 introduced OData V4 support they provided a seperate URL for the V4 published web service. The only difference is the "V4" on the end of OData in the URL (see below).
The URL works in a browser with and without the "V4" but presents different results based on the V4 protocol (see below). The OData.Feed function will only work without the "V4".
I need to understand how to use OData.Feed to get the V4 output. Is there anyone who can point me in the right direction?
Kind regards,
Mike
let
Source = OData.Feed("http://Meta-Ltp-Yoga.metaphorix.co.uk:7048/DynamicsNAV100/ODataV4/Company('CRONUS%20UK%20Ltd.')/PurchaseOrders?$select=Buy_from_Vendor_No, Document_No&$filter=Buy_from_Vendor_No eq '30000'")
in
Source
V3 URL Result
V4 URL Result