Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics NAV (Archived)

OData(V4) webservice nested structure

(0) ShareShare
ReportReport
Posted on by 55

Hi,

I have been doing some tests to use ODatav4 webservices for a webshop connection. As the webshop prefers to have the data in json format.

But I think that it is not possible to have the data in a nested structure. Like a header lines structure.

In other words it seems not possible to have a repeating subset with in a dataset.

Maybe I am doing something wrong. If so please let me know what I should do to bea bel to use subsets within a dataset using OData.

Or if not, please confirm that my conclusion is correct.

Kind regards, Henry

*This post is locked for comments

  • Ghetz Profile Picture
    Ghetz 2,983 on at
    RE: OData(V4) webservice nested structure

    Indeed! OdataV4 does not bring the SalesLine when calling the SalesHeader Pager Web Service. Whats going on?

  • hverheij Profile Picture
    hverheij 55 on at
    RE: OData(V4) webservice nested structure

    Hi Jonathon,

    Thank you for your reply.

    I have tried on the Sales Order page (42) and when using soap, you get the order lines as a subnode in the xml structure.

    When using ODataV4 I only get the header information.

    Regards, Henry

  • Suggested answer
    keoma Profile Picture
    keoma 32,675 on at
    RE: OData(V4) webservice nested structure

    which nav object did you publish (page, codeunit, ...) ? standard object or custom object ?

    in your case i suggest a page with a subpage (lines), e.g. the sales order page.

    make tests with that page.

  • hverheij Profile Picture
    hverheij 55 on at
    RE: OData(V4) webservice nested structure

    What I have tried now is to build up the subset in a global text variable using the json format and link that variable to a page field.

    However when " are used in the field an escape character \ is set in front of the " when the data is retreived by the webservice.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,711 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,458 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans