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

Dynamics 365 BC - Receive and Invoice from PO using API

(2) ShareShare
ReportReport
Posted on by 33

We're using Dynamics 365 BC on Cloud, and successfully tested the API v2.0 to query, filter, update purchase orders / lines. We now want to "Receive and Invoice" from a PO using API, the same way we do in UI:

  • Define a supplier invoice Id at PO header level
  • Set receiveQuantity / invoiceQuantity at PO lines level
  • Select "Receive and Invoice"
    • PO updated with adjusted receivedQuantity and invoicedQuantity
    • Supplier invoice created

It seems that this kind of basic action needs custom extension ? Is that correct ? How to do that ? Could somebody share an example ?

Thanks !

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

    May not require customisation. Check this out: robertostefanettinavblog.com/.../

  • Vincent D Profile Picture
    33 on at

    Do you know where to find concrete examples of PO bound actions ?

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    According to the API documentation the bound actions are not available for the purchase orders only for the purchase invoices.

    docs.microsoft.com/.../dynamics_purchaseinvoice

    docs.microsoft.com/.../dynamics_purchaseorder

    And that is actually a little strange since they both use the same table and same functions in the system.

    I have asked Microsoft for a clarification if the problem is in the documentation or in the base application and i am still waiting for their feedback.

  • Vincent D Profile Picture
    33 on at

    Ok thanks for pointing this out.

    I was thinking it's possible to add custom bound action (robertostefanettinavblog.com/.../) ? Is that correct ?

    Is this a good practice ? Or should we build a custom WS using AL ? Any example ? (It must be a very common need ?)

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    I think there has been a lot of happening on the API side since Roberto wrote his blog.

    And if i have understood it correctly you can not extend an existing API to add bound actions on it.

    So then you will probably have to do a completely new custom API.

    But Microsofts documentation does not state how i should define the bound action in my custom API.

    We could make an ODATA4 API page but those will probably be obsolete at some point so API is what should be used.

    I will try to find out some more around this and update here unless someone else knows more than me around this and got something to add.

  • Vincent D Profile Picture
    33 on at

    Hi Inge, thanks a lot for your response.

    I'm a bit lost in all API / versions / protocols availables....

    Do you thing this project could be a good starting point ?( github.com/.../PostOrdersWebService)

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    Yeah it is easy to get lost. It looks like Søren built a complete new extension around this and that should really not be necessary in my eyes.

    Max one custom API should be needed.  If you have some patience, lets see what we can figure out.

  • Vincent D Profile Picture
    33 on at

    Sure ! I'll be patient :-))

    In the meantime, I'll also try to get a better understanding of the different options/approach and post here any relevant info.

    Thanks,

    Vincent

  • Suggested answer
    Inge M. Bruvik Profile Picture
    1,161 Moderator on at

    Well i got confirmed that there is a bound post action is the standard purchase order API so no extra custom API is needed for that. Microsoft have just not put it in the documentation yet.

  • Vincent D Profile Picture
    33 on at

    Great ! Any idea of where to find any guide/example of how to use it ?

    The need is to perform following actions using API (same way as in UI)

    - Set a new nvoice number at PO level

    - Update PO lines with receive/invoice quantities

    - Call "Receive and Invoice" action

    Thks,

    VIncent

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 1,965 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,125 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 961 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans