Skip to main content

Notifications

Announcements

No record found.

Finance | Project Operations, Human Resources, ...
Suggested answer

Updating Sales Order Status using REST API

Posted on by 4
Hello all,
 
I'm seeking assistance for updating the Sales Order Status in Dynamics 365 Finance and Operations using the REST API. Currently, we manually navigate to the UI and click the Confirm Sales Order button. I'm exploring ways to streamline this process as part of our workflow.
 
Additionally, any insights into the functionality of the Confirm Sales Order button and how it updates the status in the background would be greatly appreciated.
 
Thank you
  • Suggested answer
    Martin Dráb Profile Picture
    Martin Dráb 230,198 Most Valuable Professional on at
    Updating Sales Order Status using REST API
    Confirming an order doesn't mean merely changing its status; it creates a confirmation journal (CustConfirmJour). Merely updated the status field would be wrong.
     
    If a JSON-based custom service is RESTful enough for you, you can use FormletterService, namely its postSalesOrderConfirmation operation.
     
    Another approach is using OData services and OData action. Developing such an action isn't difficult, the only problem is that you can't add OData actions through extensions. You'll need your own data entity. Confirmation posting can be done by code like this:
    SalesFormLetter_Confirm confirm = SalesFormLetter::construct(DocumentStatus::Confirmation);
    confirm.update(salesTable); 
  • Judy Profile Picture
    Judy Microsoft Employee on at
    Updating Sales Order Status using REST API
    Hi, I will help move to Finance forum.
    You can try to use Patch function to change order status using the REST API.
     
    Best Regards,
    Judy

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,269 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,198 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans