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...
Answered

Extension of Default APIs

(0) ShareShare
ReportReport
Posted on by 170

Hi Experts,

i am working on a Integration task for Business Central and a in-house application. I need to integrate Sales Order default API. But, in this API, there are limited fields. I want to extend this API and add some new field in "Sales Order Entity Buffer' table. 

However, i am confused how the data got updated/inserted in this table from 'Sales Header' table.

Thanks in advance.

I have the same question (0)
  • Verified answer
    THE Italian Profile Picture
    on at

    You have to create your own custom API. You cannot extend standard API pages. 

    If you need to know where are standard API pages, just to have a look at these, u might read this blog post

    https://www.kauffmann.nl/2019/11/02/where-is-the-api-v1-0-source-code/

  • Sunil1991 Profile Picture
    170 on at

    Thank you @Duilio Tacconi.

    This blog is very helpful.

    i have one more query, when i saw the source code of "Sales Order" API page. there is below procedure available to post the sales order.

    procedure ShipAndInvoice(var ActionContext: WebServiceActionContext)

       var

           SalesHeader: Record "Sales Header";

           SalesInvoiceHeader: Record "Sales Invoice Header";

           SalesInvoiceAggregator: Codeunit "Sales Invoice Aggregator";

       begin

           GetOrder(SalesHeader);

           PostWithShipAndInvoice(SalesHeader, SalesInvoiceHeader);

           SetActionResponse(ActionContext, Page::"APIV1 - Sales Invoices", SalesInvoiceAggregator.GetSalesInvoiceHeaderId(SalesInvoiceHeader));

       end;

    I am confused, how i can call this to post the sales shipment and invoice using the API.

    Regards,

    Sunil Kumar

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at

    By using the API base url and appending /NAV.ShipAndInvoice. More details here:

    demiliani.com/.../

  • Sunil1991 Profile Picture
    170 on at

    Thank you Stefano Demiliani.

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,917

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,161 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,025 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans