Let's walk through creating a standard Build VM
You are here
Clean Up Your Sales orders
Clean up old sales orders!
If you are a high sales order volume organization, the amount of sales order in the system can be slowing things down. Having retail sales orders can add quite a few sales orders to the system when each store syncs up with back office. Depending on your organziation, it may make sense to clear out old sales orders based on some criteria like more than 3 years old or from a specific customer group. There is functionality to do this but it works a little different than the rest of the available clean up procedures in AX 2012 / Dynamics 365 for Finance and Supply Chain. I also advise that you run this prior to running the sales update history cleanup.
In Sales and Marketing > Periodic >Clean up, look for delete orders. You'll be greeted with this screen. This is where you will see what sales orders you are proposing to delete will show after you hit select.
After you click select, you will be greeted with the query screen where you can specify almost anything you like to filter. You can filter on the standard fields or do whatever you like. However, if you select a large range, it may take a long time for the Delete orders screen to become responsive. Behind the scenes, it is creating a temporary record with SO info for what you are proposing be deleted. If you select 100k Sales Orders to delete, it has to create 100k proposed sales orders to delete records. I would suggest you divide the sales orders you would like into smaller groups under 5 thousand to prevent AX from appearing to lock up with it processes your request.
Once you click ok, this will stage a record on the delete order screen to let you know what orders will be included in the delete operation. At this point, you have 2 options. If you click ok, this will delete all of the sales orders interactively; you'll have to wait until it done. You can also click batch, set it to use batch execution then click ok. With batch processing, the request will be sent off to run whenever there is time for it. Click Ok, you will be asked to confirm you would like to delete alll of the orders in the grid and click yes. This will loop through all Sales orders in the list and attempt to delete them using standard functionality. If you are not table to delete them on the sales order list page for whatever reason, the same error checking will be executed using this screen. As part of this, it will attempts to delete all sales order lines with the sales order. If a line or header can't be deleted then nothing is changed for that sales order. This really just lets you delete sales orders in larger quantities than you could with a list page.
Dynamics 365 for Finance and Supply Chain
This functions similar to AX 2012 and can be found in the same place.