web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested answer

How I can approve the invoices using web-service?

(3) ShareShare
ReportReport
Posted on by 104

I want to approve my posted invoices from OPEN to released, So for this approach I want to use the web-service but I search almost more than 50 web-services so please share the approach for that approve the invoices using web-service.

I have the same question (0)
  • Suggested answer
    JAngle Profile Picture
    123 on at
    RE: How I can approve the invoices using web-service?

    You could use power automate or logic apps. It has the connector for BC setup with access to the web services you need. Otherwise it works as a reference for the correct web service names you need

  • steveendow Profile Picture
    2,281 on at
    RE: How I can approve the invoices using web-service?

    I initially looked into how Power Automate is able to approve documents through a BC Workflow Approval process using a flow.  I saw that it was calling WorkflowActionResponse_Approve. 

    1563.BC-Approval-Flow.jpg

    That call is not available through the BC v1.0 API, but someone helpfully explained to me that it is instead available through a Code Unit web service.

    8203.BC-Web-Service-List.jpg

    The remaining challenge would be figuring out how to call that presumably undocumented web services method. And there's the question of whether it's advisable to code against that Code Unit web service.

    But then I wondered about a different approach.  Rather than attempting to use a workflow method to update the document, I wondered if it is possible to directly update the document status.

    I don't know if this approach is advisable in BC, but I'm looking into the purchaseInvoices API to see if the "status" field can be updated with a PATCH.

    However, one oddity I found is that when I view a test Purchase Invoice in BC, the Status is Open. But when I retrieve the purchase invoice data from the BC v1.0 API, the status field value is "Draft".  So I'm concerned that there is something I'm not understanding about this approach.

    BC-Purchase-Invoice-Status.jpg

    BC-Purchase-Invoice-Open.jpg

  • sebastiendb Profile Picture
    5 on at
    How I can approve the invoices using web-service?
     
    I found this blog post, which explains it quite in detail. As far as I understood, if you want to release or open a document (status as seen in UI), you need to develop a custom API to do this

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 2,762

#2
Sumit Singh Profile Picture

Sumit Singh 2,573

#3
YUN ZHU Profile Picture

YUN ZHU 1,930 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans