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

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

How to restore "canceled" Sales Order?

(0) ShareShare
ReportReport
Posted on by 6,470

Hello,

is it possible restore / uncancel sales orders that were canceled (Have status "canceled").

If yes, please guide me how to achieve it. Could not find any procedure for it.

Thanks.

*This post is locked for comments

I have the same question (0)
  • Community Member Profile Picture
    on at
    RE: How to restore "canceled" Sales Order?

    Ran the workflow to restore the order, it worked.

  • Roger M. Profile Picture
    302 on at
    RE: How to restore "canceled" Sales Order?

    it works. Thank you

  • Khaled Alloud Profile Picture
    3,658 on at
    RE: How to restore "canceled" Sales Order?

    Dear Chandra,

    This might be time consuming specially if the SO contains many lines. Moreover, if a SO is canceled shouldn't modify it to keep track and history.

    Thank you,

  • Suggested answer
    Chandra Wijaya Setiawan Profile Picture
    1,145 on at
    RE: How to restore "canceled" Sales Order?

    Go to sales header on general ribbon

    Find for line quantity button

    For each line click deliver remainder update button

    Then put back the qty you cancelled

  • Community Member Profile Picture
    on at
    RE: How to restore "canceled" Sales Order?

    To restore cancel order to open order in lines, I did like this

    while select forupdate slineupd where slineupd.SalesId == salesTable.SalesId

                  {

                       slineupd.RemainInventPhysical = slineupd.SalesQty;

                       slineupd.RemainSalesPhysical  = slineupd.SalesQty;

                       slineupd.update();

                   }

                   select forupdate stabupd where stabupd.SalesId == SalesTable.SalesId;

                   if (stabupd.RecId)

                   {

                   stabupd.SalesStatus=SalesStatus::Backorder;

                   stabupd.update();

                   }

  • Suggested answer
    Mahmoud Hakim Profile Picture
    17,887 on at
    RE: How to restore "canceled" Sales Order?

    as standard No way , you need some customization and strong business analysis to achieve your requirements

  • Community Member Profile Picture
    on at
    RE: How to restore "canceled" Sales Order?

    Hi I added a button to cancel order and in clicked method, I added the coding as:

    db1 = box::yesNo("Do you want to Cancel PO?", dialogButton::No, "Cancel Order");

               if (db1 == dialogButton::Yes)

               {

                   db2 = box::yesNo("This Will Cancel all the PO, no further activities is possible. Do you want to continue?", dialogButton::No, "Cancel Order Confirmation");

                   if(db2 == dialogButton::Yes)

                   {

                      ttsBegin;

                      while select forupdate salesLine

                           where salesLine.SalesId == salesTable.SalesId

                       {

                           salesLine.RemainInventPhysical = 0;

                           salesLine.RemainSalesPhysical  = 0;

                           salesLine.update();

                       }

                       ttscommit;

                       SalesTable_ds.research();

                       SalesLine_ds.research();

                    }

                    else

                    {

                       info("Cancel order process stopped");

                    }

                 }

                 else

                 {

                   info("Process canceled");

                 }

    Also I've revoke cancel button how should I revoke the order?

  • Suggested answer
    Pranav Kumar Profile Picture
    on at
    RE: How to restore "canceled" Sales Order?

    If the Sales order has one line, then updating quantity/price and saving the record will change the line and header status to open but you have many lines, I guess creating new SO and copying lines from cancelled order will be feasible.

    Thanks,

    Pranav

  • Suggested answer
    inadir Profile Picture
    400 on at
    RE: How to restore "canceled" Sales Order?

    Hi ,

    you can add just a new line , and the SO will return in status open again... 

    if you want to use the same line , just change the price or qty , and the status line will change to open 

    Thanks

    Ismail

  • Guy Terry Profile Picture
    28,882 Moderator on at
    RE: How to restore "canceled" Sales Order?

    Hi Joni,

    If you create a new sales order for the same customer, then do 'Copy' -> 'From all', you can copy the lines from the cancelled order on to this new sales order.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Community Member Profile Picture

Community Member 2

#1
Guy Terry Profile Picture

Guy Terry 2 Moderator

#1
Martin Dráb Profile Picture

Martin Dráb 2 Most Valuable Professional

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans