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.

  • Sunil1991 Profile Picture
    170 on at
    RE: Extension of Default APIs

    Thank you Stefano Demiliani.

  • Suggested answer
    Stefano Demiliani Profile Picture
    37,166 Most Valuable Professional on at
    RE: Extension of Default APIs

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

    demiliani.com/.../

  • Sunil1991 Profile Picture
    170 on at
    RE: Extension of Default APIs

    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

  • Verified answer
    THE Italian Profile Picture
    on at
    RE: Extension of Default APIs

    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/

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,145 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,917 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans