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

Purchase order - how to update vendor invoice number using patch call?

(0) ShareShare
ReportReport
Posted on by 15

I am trying to use receiveandinvoice bound action for purchase order. The series of action I am trying to perform here using API is as follow.

Step 1: Get the details of purchase order.

Step 2: Update purchase order lines to set qty. to receive and invoice to some value less than total quantity and for the remaining quantity I will be creating one more invoice.

Step 3: Update Vendor invoice number to some Invoice Number.

Step 4: Call receiveandinvoice on that purchase order so that it creates posted purchase invoice with the vendor invoice number that I have updated.

Challenge here is that I am not able to find any way of updating vendor invoice number in purchase order using it's patch request.

Can anyone help me out to identify way using which i can update vendor invoice number? Because I need take vendor invoice number from users to create posted purchase invoice using that number itself and also change it for the second invoice if I am only receiving partial quantity of total quantity for purchase order.

Also suggest if I am going in wrong direction.

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

    Hello,

    Are you receiving an error with this? It is not that difficult to perform a patch operation via for example Postman while testing, but the format may be challenging:

    community.dynamics.com/.../put-patch-operation-failed-for-odata-web-api-in-d365-bc

    Hope it helps already.

    Thanks.

  • Purav Gosai Profile Picture
    15 on at

    No I am not getting any kind of error with the patch request but I am not able to find the property that I want to update. Please find below image for reference that show the property that I want to update.

    pastedimage1653472115251v1.png

    I am not even able to get this property while retrieving the purchase order details. So, it is difficult to identity how to update that property using patch call.

  • Suggested answer
    Marco Mels Profile Picture
    on at

    Hello,

    The property has not been exposed on purchaseOrder while it is exposed on purchaseInvoice.

    docs.microsoft.com/.../devenv-develop-custom-api

    Hope it helps.

    Thank you.

  • Suggested answer
    YUN ZHU Profile Picture
    95,329 Super User 2025 Season 2 on at

    Hi, About the Patch method:

    https://yzhums.com/6117/#toc16

    And since standard APIs cannot be extended. If there is no vendor invoice number field in the standard APIs, you need to customize one, or use Odata.

    Hope this helps as well.

    Thanks.

    ZHU

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 3,229

#2
Jainam M. Kothari Profile Picture

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

#3
YUN ZHU Profile Picture

YUN ZHU 1,153 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans