Is it possible to include related entities when querying the OData web service?

jesseconnrjesseconnr Posts: 3Member
edited 2017-06-14 in NAV Three Tier
I'm on 2013 R2.

I can get sales orders and then for each sales order I can get its sales lines, but this isn't very efficient and the result would be several calls.

What I'd like to do is get sales orders and have sales lines included so that when I use $format=json the sales lines are an array on each sales order object.

Currently the only work-around I see is just including all of the sales header info on the sales line, which means I then have to code DTOs to create the objects instead of just deserializing the json.

Answers

  • JuhlJuhl Posts: 358Member
    Use a Query and put header info on lines.
    Or a query for header and one for all the lines.
    Follow me on my blog juhl.blog
Sign In or Register to comment.