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 :
Microsoft Dynamics AX (Archived)

How to restore "canceled" Sales Order?

(0) ShareShare
ReportReport
Posted on by 6,480

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)
  • Suggested answer
    Khaled Alloud Profile Picture
    3,658 on at

    You cannot restore a canceled order. You can create a template the import the order but this needs development. Or you can user the Add lines from Sales order Lines to add multiple items at the same time.

  • Guy Terry Profile Picture
    28,965 Moderator on at

    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.

  • Suggested answer
    inadir Profile Picture
    400 on at

    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

  • Suggested answer
    Pranav Kumar Profile Picture
    Microsoft Employee on at

    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

  • Community Member Profile Picture
    on at

    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
    Mahmoud Hakim Profile Picture
    17,887 on at

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

  • Community Member Profile Picture
    on at

    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
    Chandra Wijaya Setiawan Profile Picture
    1,145 on at

    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

  • Khaled Alloud Profile Picture
    3,658 on at

    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,

  • Roger M. Profile Picture
    302 on at

    it works. Thank you

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Joris dG Profile Picture

Joris dG 5

#2
Alexey Lekanov Profile Picture

Alexey Lekanov 2

#2
Henrik Nordlöf Profile Picture

Henrik Nordlöf 2 User Group Leader

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans