BeyondERP.Newsletter
Menu

Setup step on the Delete sales orders page · Retail and Commerce

Delete sales orders that are no longer needed

Remove selected sales orders in bulk.

See how to set it up Back to Retail and Commerce

Used by
Credit management clerk, Credit management manager, Project assistant and 7 more roles
Business process
Manage sales orders
Menu item
SalesDelete
Main table
SalesParmTable
Setup steps
1 on this page

How this guide was checked

Checked in Dynamics 365
Version 10.0.49: the menu item, form, table and security, the page.
Recommended values
Based on Microsoft's documentation. A sound starting point to adjust to your own business requirements.
Tests
A ready-to-run test, “Old orders are deleted”, to confirm this setup in your own test environment.
Show what matters for
SETUP GUIDEHow to set it up8 sections. Choose a role to highlight what matters to you.
Everyone

1What it is and why

What it isA periodic job that deletes selected sales orders.
What you do hereUse this periodic task to remove sales orders you no longer need, including orphaned sales order records.
ExampleFor example, BEAT keeps sales orders for 3 years. Each January it deletes about 60,000 invoiced orders created before that cut-off, after testing the same selection in a sandbox.
Delete sales orders page in Dynamics 365
The page in Dynamics 365. page title tab to open what to set or check
Functional consultant · Solution architect

2Where it fits

Business processManage sales orders
Menu pathRetail and Commerce › Retail and Commerce IT › Clean up › Delete sales orders
Set up firstAll sales orders Microsoft Learn
Used next bySales update history cleanup Microsoft Learn
Related pagesDelete quotations Microsoft Learn Delete return orders Microsoft Learn Order events cleanup Microsoft Learn
In this process Review sales order lines · Delete closed return orders
End user · Functional consultant

3How to do it

About the examples: Examples and screenshots in this guide use BEAT, a demo company in a Dynamics 365 test environment. Use your own company's codes and values instead of copying them.

When to run it

When to run itWhen sales orders are no longer needed, or orphaned sales order records must be cleaned up, after the business has confirmed the data isn't required.
How oftenOn demand, when there are sales orders or orphaned sales order records to remove.
What the output showsThe selected sales orders are removed from the current legal entity. If an invoiced order was deleted by mistake, you can still find its details from the customer's transactions through Original document > View details.

Source: Microsoft Learn

Setup steps on this page

Delete sales orders that are no longer needed

Remove selected sales orders in bulk.

Steps from Microsoft

  1. Go to Retail and Commerce > Retail and Commerce IT > Clean up > Delete sales orders.
  2. Filter the list to find the sales orders you no longer need, including orphaned sales order records.
  3. Review the Sales order, Customer account, Name, Date of creation, Document status and Deadline columns so you only pick orders that can go.
  4. Use Select on the toolbar to choose the sales orders to delete.
  5. Select Confirm deletion, Delete or Batch for the delete action you need, then open All sales orders and check that only the chosen orders are gone.

Source: Microsoft Learn

Common errors and fixes

MessageWhat to do
An order can't be deletedOrders with open quantities or documents in progress can't be removed. Finish or cancel the order first. Microsoft Learn

Test checklist

  1. The deleted orders no longer appear in All sales orders.
  2. Orders that weren't selected are unchanged.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Delete sales orders that are no longer neededRun it only for orders that are fully invoiced or cancelled and past your retention period, after a test in a copy of production.Deleting orders can't be undone and breaks the link from later documents to the order.Which orders may be deleted?Deleting open orders, so work in progress is lost.Test: Old orders are deleted

Feature management and licence

Licence or add-inIn this system 10 roles can open this page, among them Credit management clerk, Credit management manager, Project assistant and Rental coordinator agent.

Checked in Dynamics 365

Solution architect

5Design impact

Shared or per companyPer company: each legal entity has its own records. Microsoft data model
Can it be undoneIrreversible: Deleted orders can't be restored.
If you change it laterDeletes the selected sales orders, including orphaned sales order records, in the current legal entity. Microsoft Learn
Technical architect

6Technical

Menu itemSalesDelete Checked in Dynamics 365
FormSalesDeleteOrder Checked in Dynamics 365
TableSalesParmTableShown as “Sales order - update table” in Record infoKey field: SalesIdChecked in Dynamics 365
Who can open it

11 security roles. Select a role to see its duties and privileges.

  • RoleCredit management clerkCredManClerk
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleCredit management managerCredManManager
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleMCRTestUserRole no duty on this page is assigned to this role directly
  • RoleProject assistantProjProjectClerk
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleRental coordinator agentRentalCoordinatorAgent
    • DutyMaintain rental sales ordersRentalSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleRental managerRentalManager
    • DutyMaintain rental sales ordersRentalSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleRental purchasing managerRentalPurchasingManager
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleRental sales managerRentalSalesManager
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleRetail serviceRetailService
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleRevenue recognition managerRevRecManager
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
  • RoleSales clerkTradeSalesClerk
    • DutyMaintain sales orderSalesOrderMaintain
      • PrivilegeProcess sales order deletionSalesDeleteProcess
Checked in Dynamics 365
Roles to set it up and use itTo use itRetail service RetailServiceSales clerk TradeSalesClerkRental manager RentalManagerRental coordinator agent RentalCoordinatorAgentRental sales manager RentalSalesManagerGive people one of these roles. On this system, 10 roles can run this page.Checked in Dynamics 365
Actions on the pageOptions: Personalize, Page options, ShareChecked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=SalesDelete
Data migrationLoad order: Delete sales orders has no data entity in Data management, so it can't be loaded from a file or a configuration template. Migrate only the open orders you need; this job removes orders that are already in the system.Checked in Dynamics 365
Table definitionSalesParmTable columns and relations Microsoft data model
Everyone

8Sources