In AX, it is possible to delete an invoiced Purchase Order or Sales Order. You can also just delete an invoiced order line. Further, you can set a parameter to automatically delete an invoiced order or lines. Whether or not you want to allow deletion and whether or not you want to store the deleted orders are important considerations. There are a few parameters in AX related to this:
1. Mark Order as Voided: You can find this parameter in both Accounts Payable and Accounts Receivable under Setup > Parameters > General Tab. Activating this parameter will store an order or order lines that a user deletes.
These orders and lines can be accessed in both AP and AR under Inquiries> History> Voided sales (or purchase) orders.
Orders and lines of any status—not just Invoiced—are stored if this parameter is checked.
2. Safety level of invoiced orders:This parameter has three options that control what happens when a user attempts to delete an invoiced order
None: This allows the user to delete or modify the invoiced order just as easily and with the same process as an order that has not been invoiced.
Warning: This will still allow the deletion or modification, but it will display a warning first.
Locked: This prevents a user from modifying or deleting an invoiced order.
3. Delete order line invoiced in total: You can find this parameter in both Accounts Payable and Accounts Receivable under Setup > Parameters > General Tab. Activating this parameter will automatically delete an order line once the full quantity on the line is invoiced. This happens immediately after the line is invoice posted.
4. Delete order after invoicing: This parameter is directly below the parameter for deleting the order line. The difference between the two is that this one will delete the order as soon as the order is completely invoiced.This happens immediately after the order is fully invoice posted (all lines on the order are invoiced), just as with the invoice line deletion.
When considering these options, keep in mind the following: