Skip to main content

Notifications

Announcements

No record found.

Business Central forum
Suggested answer

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

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.

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 70,124 Super User 2024 Season 2 on at
    RE: Purchase order - how to update vendor invoice number using patch call?

    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

  • Suggested answer
    Marco Mels Profile Picture
    Marco Mels on at
    RE: Purchase order - how to update vendor invoice number using patch call?

    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.

  • Purav Gosai Profile Picture
    Purav Gosai 15 on at
    RE: Purchase order - how to update vendor invoice number using patch call?

    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
    Marco Mels on at
    RE: Purchase order - how to update vendor invoice number using patch call?

    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.

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

Anton Venter – Community Spotlight

Kudos to our October Community Star of the month!

Announcing Our 2024 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Dynamics 365 Community Newsletter - September 2024

Check out the latest community news

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,564 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 228,651 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,148

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans