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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Update status of sales invoice in Business Central using API

(0) ShareShare
ReportReport
Posted on by

Is it possible to update the status of a Sales Invoice in Business Central via the API or in Business Central?

Screenshot-_2800_241_2900_.png

  • JAngle Profile Picture
    159 on at

    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.

  • Suggested answer
    Mohsin Abbas Profile Picture
    525 on at

    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

  • Community Member Profile Picture
    on at

    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.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the August Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 750 Super User 2026 Season 2

#2
YUN ZHU Profile Picture

YUN ZHU 534 Super User 2026 Season 2

#3
AndrewThomas81 Profile Picture

AndrewThomas81 287 Super User 2026 Season 2

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans