Notifications
Announcements
No record found.
Is it possible to update the status of a Sales Invoice in Business Central via the API or in Business Central?
There is a codeunit published as a web service called WorkflowActionResponse. It has two actions that Power Automate uses to do the activity you want over Odata (RESTful API) - WorkflowActionResponse_Approve or WorkflowActionResponse_Reject. It takes a Workflow Step ID as a parameter. Given you're not trying to do that I expect you will need a custom codeunit to perform the task. This blog gives an example of doing such a thing: joshanglesea.wordpress.com/.../
Business Central controls the "Status" field with the use of code so you'd need to do similar via an API call.
In Sales Header table(36), there is a function SetStatus(). You can call this function in one of your codeunits(or create a new codeunit) and expose it as a webservice.Please let me know if this helps.Regards,Mohsin Abbas
Could you please elaboarte more on this. Where can I find the SetStatus() function? Is there a documentation I can look up on how to create a new codeunit and expose it as a webservice? 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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
OussamaSabbouh 3,143
Jainam M. Kothari 1,694 Super User 2025 Season 2
YUN ZHU 1,067 Super User 2025 Season 2