Sales order cancellation

Fashion & Management  •  Article  •  9/23/2026  • 

The Aptean Apparel Sales Order Maintenance feature provides a complete, controlled way to withdraw quantities from a sales order without physically deleting the order. It replaces uncontrolled deletion of confirmed orders with an auditable cancellation that captures a reason, stamps who cancelled it and when, zeroes only the quantities that are still outstanding, releases the inventory those quantities were holding, and leaves everything already shipped or invoiced untouched — all within Microsoft Dynamics 365 Business Central, with no manual quantity edits, no deleted history, and no orphaned reservations.

Cancellation works at four levels — the whole order, an individual sales line, a style (size matrix) line, and many lines across many orders at once — together with the ability to reverse a cancellation, a dedicated list of every cancelled order, and firm rules that decide when an order may be deleted versus cancelled.

Sales Order Maintenance is typically used to:

  • Cancel the entire outstanding balance of a sales order in a single action, with a mandatory reason code.
  • Cancel one or more individual sales lines while leaving the rest of the order active.
  • Cancel a style line across its size matrix, zeroing every eligible size in one step.
  • Cancel outstanding lines in bulk across many orders from a single maintenance page.
  • Preserve everything already shipped or invoiced when the remaining quantity is withdrawn.
  • Release inventory reservations and lot/serial assignments held by the cancelled quantity.
  • Zero the Outstanding Bulk Qty of a cancelled bulk order line so the cancelled quantity can no longer be distributed, and restore it when the line is uncancelled.
  • Reverse a cancellation (uncancel) and restore the remaining quantities when an order is withdrawn in error.
  • Review every cancelled order — with its cancellation date, reason, and salesperson — from a dedicated list.
  • Prevent confirmed and Shopify orders and their individual lines from being deleted, forcing the auditable Cancel path instead.

Cancel an entire sales order

The Cancel action on the Sales Order card withdraws all remaining quantity from every eligible line on the order at once. It is available only after the order has been released at least once; an order that has never been released should be deleted instead. Cancellation requires a reason code and never touches quantities that have already been shipped or invoiced.

The following procedure outlines how to cancel a sales order:

  1. Open the sales order you want to cancel on the Sales Order card.
  2. On the action bar, in the Order group, select Cancel.
  3. When prompted, select a Reason Code and confirm.

The system processes the order as follows:

  • For every eligible line, Outstanding Quantity and Qty. to Ship are set to zero, the outstanding amount is recalculated, the entered reason code is stamped on the line as its Modify Reason Code, the line's Order Cancel Date is set to the same date as the order's Order Cancel Date, the line is marked Cancelled, and any inventory reservations and lot/serial assignments held by that line are released.
  • A line that was already cancelled individually before the order-level cancellation keeps its own Modify Reason Code and Order Cancel Date — the header cancellation does not overwrite them.
  • On a bulk order line, Outstanding Bulk Qty is also set to zero, so the cancelled quantity can no longer be distributed (see Bulk order lines and cancellation).
  • Quantities already shipped are preserved, and any remaining Qty. to Invoice on a partially shipped line is left intact so the shipment can still be invoiced.
  • The order header records the Reason Code and is marked Cancelled once no line has outstanding quantity remaining. When no outstanding quantity and no quantity to invoice remain anywhere on the order, the order is also marked as Completed.

A line is not cancellable, and is left unchanged, when the order is a Shopify order, when it is a bulk order that already has distributions, when the line has no outstanding quantity, or when the remaining quantity sits on an open warehouse pick or shipment (picked or packed). If no line on the order is cancellable, the action is blocked.

FieldDescription
Reason CodeSpecifies the reason the order is being cancelled. This field is mandatory; the cancellation is rejected if it is left blank. The value is stored on the order header and stamped on every cancelled line as the line's Modify Reason Code.
CancelledIndicates that all remaining quantities on the order have been cancelled. Quantities already shipped or invoiced are not affected, so a partially shipped order whose remainder was cancelled is also marked as cancelled. Cancelled orders are read-only.
Order Cancel DateSpecifies the date on which the sales order was cancelled.
Cancelled BySpecifies who cancelled the sales order.
  • The Cancel action is available only after the order has been released at least once. On a never-released order the action is disabled — delete the order instead. The system treats an order as released once any of its lines carries an Original Ordered Quantity.
  • A Shopify order, or a bulk order that already has distributions, cannot be cancelled.
  • An order that is already cancelled or already completed cannot be cancelled again.

Cancel individual sales lines

When only part of an order needs to be withdrawn, cancel the specific lines from the sales order lines subform rather than the whole order. Each line carries its own Modify Reason Code, which becomes the cancellation reason for that line, so the reason is captured per line.

The following procedure outlines how to cancel one or more sales lines:

  1. On the Sales Order card, in the lines subform, enter a Modify Reason Code on every line you intend to cancel.
  2. Select the line or lines to cancel. You can multi-select.
  3. On the subform action bar, select Cancel Line.

The system processes each selected line as follows:

  • Outstanding Quantity and Qty. to Ship are set to zero, Qty. to Invoice is adjusted, and the outstanding amount is recalculated.
  • The line's Order Cancel Date, the line is marked Cancelled, and the reservations and lot/serial assignments held by the line are released. On a bulk order line, Outstanding Bulk Qty is also set to zero.
  • When cancelling the line drives the whole order to no outstanding quantity, the order header is marked Cancelled; when no quantity to invoice remains either, the order is also marked Completed.

When several lines are selected and only some are eligible, the eligible lines are cancelled and the ineligible lines are skipped without rolling back the ones that succeeded.

FieldDescription
Modify Reason CodeSpecifies the reason for cancelling the line. It must be filled on every selected line before Cancel Line runs; the action errors if any selected line has no reason. This value is stored as the line's cancellation reason.
Order Cancel DateSpecifies the date on which the sales line was cancelled. The field is blank on a line that is not cancelled, is set when the line is cancelled (at line level or by an order-level cancellation), and is cleared when the line is uncancelled.
CancelledIndicates that the line's outstanding quantity has been cancelled. Shipped and invoiced quantities are unaffected.
  • Cancel Line requires the Modify Reason Code on every selected line.
  • Cancel Line is available only after the order has been released at least once, and only while the order is not completed.
  • A line on a Shopify order, a bulk line that already has distributions, a fully shipped line, or a line whose remaining quantity is on an open pick or shipment cannot be cancelled and is skipped or blocked. Attempting to cancel a fully shipped line raises the fully-shipped error directly, before any reason code validation.

Cancel style lines

For style lines, cancellation is available directly from the style size matrix, so an entire style can be withdrawn across all of its sizes in one step. The Modify Reason Code drives the cancellation reason, exactly as it does for a single sales line.

The following procedure outlines how to cancel a style line:

  1. On the Sales Order card, open the style line in the size matrix.
  2. Enter the Modify Reason Code for the style line.
  3. On the matrix action bar, select Cancel Line.

The system zeroes every eligible size on the style line, stamps the Order Cancel Date on each size, marks each size as Cancelled, and releases the reservations held by those sizes. On a bulk order style line, the Outstanding Bulk Qty of each cancelled size is also set to zero. If any size on the style is fully shipped or sits on an open pick or shipment, the action is blocked and identifies the offending size, so a style is never left partially withdrawn without warning. As with the other paths, once the whole order reaches no outstanding quantity it is marked Cancelled and Completed when no quantity to invoice remains.

Bulk order lines and cancellation

On a bulk order line, Outstanding Bulk Qty plays the role that Qty. to Ship plays on a regular line — it is the quantity still available for distribution to release orders. Cancellation therefore treats it as part of the outstanding balance:

  • A bulk order line that has no distributed orders yet can be cancelled through every cancellation path — the Sales Order card (header cancel), the lines subform, the style size matrix, and Sales Line Mass Maintenance. When it is cancelled, Outstanding Bulk Qty is set to zero in addition to the regular quantity fields, so the cancelled quantity can no longer be distributed.
  • When a cancelled bulk order line is uncancelled — from the lines subform, the style matrix, or the Cancelled Sales Orders page — Outstanding Bulk Qty is restored to the line's full Quantity, making it available for distribution again.
  • A bulk order line that already has distributed orders remains ineligible: it cannot be cancelled from any path and does not appear in Sales Line Mass Maintenance search results.

Cancel lines in bulk across orders

The Sales Line Mass Maintenance page cancels outstanding lines across many orders in a single pass. Rather than opening each order, you filter for the lines you want, review the qualifying results, and cancel the selected lines together. The page loads only lines from orders that have been released, and only lines that are genuinely eligible to cancel.

The following procedure outlines how to cancel lines in bulk:

  1. Select the Search iconSearch icon, enter Sales Line Mass Maintenance, and then choose the related link. The Sales Line Mass Maintenance page opens with no rows until you run Search.
  2. In the Filters group, enter any combination of the filter fields to narrow the lines you want to work with.
FieldDescription
Customer No.Specifies the customer to filter lines by. Leave blank to include all customers.
Order Type CodeSpecifies the order type to filter by. Leave blank to include all order types.
Sales Order No.Specifies one or more sales order numbers to filter by. Use the lookup to select multiple orders.
Style CodeSpecifies the style to filter lines by. Leave blank to include all styles.
Item No.Specifies the item to filter lines by. Leave blank to include all items.
From/To Requested Delivery DateSpecifies the requested delivery date range to filter by.
From/To Cancel DateSpecifies the cancel date range to filter by.
  1. In the Mass Update group, enter the Reason Code that will be applied to the cancelled lines.
FieldDescription
Reason CodeRequired. The reason code applied to all cancelled lines. This is the same Mass Update Reason Code used by the other mass update operations — Cancel Lines does not prompt for a separate reason.
  1. On the action bar, select Search to load the qualifying sales lines.

Only eligible lines are shown — lines with outstanding quantity, no active warehouse activity, not on a Shopify order, and not on a bulk order that already has distributions. Bulk order lines that have no distributed orders are included in the results and can be cancelled like any other line. A mixed order contributes only its eligible lines, and a filter that matches nothing simply returns no rows without raising an error.

  1. Select the lines to cancel — across as many orders as you like — and select Cancel Lines. Confirm the count when prompted.

Each selected line is zeroed, marked Cancelled, stamped with the reason, and has its reservations and lot/serial assignments released. The reason code and cancellation are applied only to the lines you selected and cancelled — other lines on the same orders are left untouched. On bulk order lines, Outstanding Bulk Qty is zeroed as part of the cancellation. Every header touched by the run is re-evaluated, so any order driven to no outstanding quantity is marked Cancelled (and Completed when nothing remains to invoice). When the run finishes, a summary reports how many lines were cancelled and how many were skipped, and the two always add up to the number selected. The skipped count comes with a filterable reference to the affected orders, so you can review which lines were not processed. If a line became ineligible between Search and Cancel — for example it picked up a warehouse pick in the meantime — it is skipped rather than failing the whole run, and its fields are left unchanged.

  • Cancel Lines requires a Reason Code; the run is blocked if it is left blank.
  • If the filter matches more orders than the system can process in one query, a clear message asks you to narrow the filter.
  • Running Cancel Lines more than once in a session accumulates the summary counters rather than resetting them.

Deletion Restrictions

Sales Order Maintenance replaces uncontrolled deletion with cancellation for orders that carry history. The rules are:

  • An order that has never been released can still be deleted normally — there is nothing to preserve, so cancellation is not required.
  • An order that has been released at least once cannot be deleted; it must be cancelled instead, so its history and audit trail are retained.
  • A Shopify order cannot be deleted or cancelled under any circumstance, because its lifecycle is owned by the source system.
  • Deleting individual lines is restricted the same way: the Delete Line action is blocked on the sales order lines subform and on the style size matrix when the order is a Shopify order or has been released (confirmed).

When deletion is blocked, the system explains why and points you to the Cancel action. This keeps every confirmed order accounted for: it is either active or cancelled with a reason — never silently removed.

Read-only behavior of cancelled and completed orders

Once an order is marked Completed or Cancelled, the card and its subforms become read-only and the Reopen action is disabled, so a withdrawn order cannot be quietly edited afterwards. Reporting and the Cancelled Orders list therefore always reflect the true, locked state of the order. To make further changes, reverse the cancellation first (see Uncancel a cancelled order).

View cancelled orders

A Cancelled column on the Sales Orders list shows at a glance which orders have been cancelled, and a dedicated Cancelled Orders page lists them with their cancellation details for review and follow-up.

The following procedure outlines how to review cancelled orders:

  1. Select the Search iconSearch icon, enter Sales Orders, and then choose the related link. The Sales Orders list opens.
  2. On the action bar, select Cancelled Orders. The Cancelled Sales Orders page opens, filtered to cancelled orders only and shown read-only. The filter is permanent and cannot be removed, and the New and Manage actions are not available on this page — no record can be created or edited from the list.

Cancelled Orders Action

The page lists each cancelled order with the following details:

FieldDescription
No.Specifies the number of the cancelled sales order.
Sell-to Customer No. / NameSpecifies the customer number and name on the cancelled order.
Order DateSpecifies the date the sales order was created.
Order Cancel DateSpecifies the date the sales order was cancelled. For an order that became cancelled through line-level cancellations, this is the Order Cancel Date of the most recently cancelled line.
Reason CodeSpecifies the reason code entered when the order was cancelled. When the order was cancelled from the header, this is the header's reason code; when the order became cancelled through line-level cancellations, the list shows the Modify Reason Code of the cancelled line with the latest Order Cancel Date.
Cancelled BySpecifies who cancelled the order.
Salesperson/Salesperson 2Specifies the salespersons assigned to the cancelled order.
Season Code/ Division Code / Order TypeSpecifies the season, division, and order type on the cancelled order.

To open a cancelled order for review, select it and choose Show Document. The order opens read-only, so its cancelled state cannot be altered from here.

Uncancel a sales line

A cancellation made in error can be reversed. On the sales order lines subform, and on the style size matrix, the Uncancel Line action restores the remaining (not yet shipped or invoiced) quantity to a previously cancelled line — no reason code is required to reverse.

The following procedure outlines how to uncancel a line:

  1. On the Sales Order card, in the lines subform (or the style size matrix), select the cancelled line to restore.
  2. Select Uncancel Line.

The system restores Qty. to Ship, Qty. to Invoice, the outstanding quantity, and the outstanding amount from the remaining quantity, recalculates the amounts, and clears the Cancelled mark on the line. The line's Modify Reason Code and Order Cancel Date are cleared as part of the reversal. When the order itself has been marked Cancelled, the order is reopened as part of the same action, so it becomes editable again. For a style line, every cancelled size is restored together.

Uncancel Line is only meaningful on a line that is currently cancelled; on a line that is not cancelled it has no effect. On the style size matrix, Uncancel Line is available when the sizes associated with the style line are cancelled; if a size is not cancelled, the action is not applicable to it.

Uncancelling restores quantities but does not automatically recreate the inventory reservations that were released at cancellation; reserve the restored quantity again if it is needed.

Uncancel a cancelled order

Whole orders can be reversed from the Cancelled Orders page, which is convenient when an entire order is cancelled by mistake.

The following procedure outlines how to uncancel one or more orders:

  1. Open the Cancelled Sales Orders page (Sales Orders list → Cancelled Orders).
  2. Select the cancelled order or orders to restore.
  3. On the action bar, select Uncancel Orders and confirm.

Every cancelled line on each selected order is reversed — the remaining quantities are restored to Qty. to Ship, Qty. to Invoice, and Outstanding Quantity — and the Cancelled and Completed flags are cleared on both the lines and the order. The Modify Reason Code and Order Cancel Date of each reversed line are cleared, and on bulk order lines the Outstanding Bulk Qty is restored to the full line Quantity. Lines that were never cancelled are left untouched. No reason prompt appears, because uncancelling is a straightforward reversal. Each restored order drops off the Cancelled Orders list, while the orders you did not select remain.