web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

ODATA - Adding header and lines in one call/round trip

(0) ShareShare
ReportReport
Posted on by

Hi :)

Hopefully someone here can help me with this, I'm finding useful documentation and examples for ODATA in Business Central hard to come by.

I have custom tables ("Inbound Job" and "Inbound Job Task Line"), the usual page (InboundJobQuotes) and subform (serviceLines) setup for ODATA web services. Using Postman I can create a header as follows:

POST [..] InboundJobQuotes
{
    "jobno":"JO001",
}


..and a subform line as follows:

POST [..] InboundJobQuotesserviceLines
{
    "jobno": "JO001",
    "lineno": 1,
    "description":, "Description JO001"
}


But that's two round trips. Ideally (And surely it should support this) I want this:


POST [..] InboundJobQuotes
{
    "jobno":"JO001",
    InboundJobQuotesserviceLines: [
        {
            "lineno": 1,
            "description":, "Description JO001"
        }
    ]
}

I get no error, but no lines are created either.

Anyone know what I'm doing wrong?

TIA

I have the same question (0)
  • Suggested answer
    srttel Profile Picture
    on at

    Hi Heidi, what you basically want is deep inserts. It is hard to say why this is not working, but there are some blog articles out there which describes the deep insert function - I hope this will help you - www.kauffmann.nl/.../

  • Community Member Profile Picture
    on at

    Thanks Sebastian, I shall have a read.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,238

#2
YUN ZHU Profile Picture

YUN ZHU 773 Super User 2025 Season 2

#3
Sumit Singh Profile Picture

Sumit Singh 630

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans