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

Announcements

No record found.

News and Announcements icon
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
    Microsoft Employee 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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,032 Super User 2026 Season 1

#2
Dhiren Nagar Profile Picture

Dhiren Nagar 1,049 Super User 2026 Season 1

#3
YUN ZHU Profile Picture

YUN ZHU 1,029 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans