BeyondERP.Newsletter
Menu

Setup step on the Cleanup completed tasks page · Retail and Commerce

Clean up completed tasks

Delete old completed tasks on a schedule.

See how to set it up Back to Retail and Commerce

Used by
Retail operations manager, Retail service, Retail store IT and 2 more roles
Business process
Manage store operations
Menu item
RetailTaskCleanerController
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 tasks 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 completed tasks that are older than the number of retention days you set.
What you do hereRun this job to keep the task list short by removing old completed tasks.
ExampleFor example, you run it weekly and keep 90 days of completed tasks.
Cleanup completed tasks 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

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 completed tasks have built up and you no longer need to look back at them.
How oftenAs a recurring batch job, or on demand.
Batch settingsRecurring batch job with the retention days that suit your follow-up.
What the output showsNo report. Completed tasks older than the Retention days are deleted. Open tasks are kept.

Source: Microsoft Learn

Setup steps on this page

Clean up completed tasks

Delete old completed tasks on a schedule.

Steps from Microsoft

  1. Go to Retail and Commerce > Task management > Cleanup completed tasks.
  2. Under Parameters, enter the Retention days. Completed tasks older than that are deleted.
  3. Choose a number of days that still covers the follow-up you do on Task management processes.
  4. Set Batch processing, the Batch group and Recurrence under Run in the background if it should repeat.
  5. Afterwards, open Task management processes: completed tasks older than the retention days are gone, and open tasks are still there.

Source: Microsoft Learn

Common errors and fixes

MessageWhat to do
Completed tasks are still listedOnly tasks older than the retention days are deleted, and only when the job runs. Check the retention days and the batch recurrence. Microsoft Learn

Test checklist

  1. Completed tasks older than the retention days are gone.
  2. Open and recent tasks remain.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Clean up completed tasksRun it weekly as a batch job with retention days that cover your follow-up period.Deleted tasks can't be restored.How many days of completed tasks to keep?Retention days shorter than the reporting period.Test: Old tasks are deleted

Feature management and licence

Licence or add-inIn this system 5 roles can open this page, among them Retail service, Retail operations manager, Retail store manager and Retail store IT.

Checked in Dynamics 365

Solution architect

5Design impact

Shared or per companyPer organization: the job deletes completed tasks of all stores older than the retention days. Microsoft Learn
Can it be undoneIrreversible: Deleted tasks can't be restored.
If you change it laterDeletes completed tasks older than the retention days. Microsoft Learn
Technical architect

6Technical

Menu itemRetailTaskCleanerController Checked in Dynamics 365
FormSysOperationTemplateForm Checked in Dynamics 365
Who can open it

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

  • RoleRetail operations managerRetailOperationsManager
    • DutyMaintain retail channelsRetailChannelsMaintain
      • PrivilegeMaintain Teams IntegrationRetailTeamsIntegrationMaintain
  • RoleRetail serviceRetailService
    • DutyMaintain retail channelsRetailChannelsMaintain
      • PrivilegeMaintain Teams IntegrationRetailTeamsIntegrationMaintain
  • RoleRetail store ITRetailStoreIT
    • DutyMaintain retail channelsRetailChannelsMaintain
      • PrivilegeMaintain Teams IntegrationRetailTeamsIntegrationMaintain
  • RoleRetail store managerRetailStoreManager
    • DutyMaintain retail channelsRetailChannelsMaintain
      • PrivilegeMaintain Teams IntegrationRetailTeamsIntegrationMaintain
  • RoleRetail task managerRetailTaskManager
    • DutyMaintain task management processRetailTaskManagementMaintain
      • PrivilegeMaintain Teams IntegrationRetailTeamsIntegrationMaintain
Roles worked out from Microsoft's standard security setup and checked in a working Dynamics 365 system (version 10.0.49)
Roles to set it up and use itTo use itRetail service RetailServiceRetail operations manager RetailOperationsManagerRetail store manager RetailStoreManagerRetail store IT RetailStoreITRetail task manager RetailTaskManagerGive people one of these roles. On this system, 5 roles can run this page.Checked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=RetailTaskCleanerController
Data migrationLoad order: Cleanup completed tasks has no data entity in Data management, so it can't be loaded from a file or a configuration template. The job only deletes tasks already in the system; there is nothing to load.Checked in Dynamics 365
Everyone

8Sources

To cite this step: RC-TASK-040, Clean up completed tasks. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/RC-TASK-040