Skip to main content

Notifications

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 229,297 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

November Spotlight Star - Khushbu Rajvi

Congratulations to a top community star!

Forum Structure Changes Complete!

🔔 Be sure to subscribe to the new forums you are interested in to stay up to date! 🔔

Dynamics 365 Community Platform update – Oct 28

Welcome to the next edition of the Community Platform Update. This is a status …

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 290,902 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 229,297 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans