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

How I can approve the invoices using web-service?

(1) ShareShare
ReportReport
Posted on by 100

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.

  • 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

  • Suggested answer
    JAngle Profile Picture
    63 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

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

Daivat Vartak – Community Spotlight

We are honored to recognize Daivat Vartak as our March 2025 Community…

Announcing Our 2025 Season 1 Super Users!

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

Kudos to the February 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... 292,884 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,760 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans