BeyondERP.Newsletter
Menu

Setup step on the Calendar cleanup page · Organization administration

Clean up old calendar working times

Delete working hours before a date to keep calendar data small.

Used by
Payroll administrator, Process engineer, Production manager and 3 more roles
Business process
Administer system features
Menu item
action:WorkCalendarDelete
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 working times are deleted up to the date”, 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 old working times from calendars up to a date you choose.
What you do hereUse this periodic task to remove old calendar working hours before an end date, to keep calendar data small.
ExampleFor example, with Delete working times until set to 1/1/2025, working hours up to 12/31/2024 are deleted from the filtered calendars, and the hours on 1/1/2025 and later stay.
Calendar cleanup 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 processAdminister system features
Menu pathOrganization administration › Periodic › Calendar cleanup
Set up firstCalendars Microsoft Learn
Used next byWorking time templates Microsoft Learn
Related pagesResources Microsoft Learn
In this process Run batch processing for a batch group · Delete historical addresses in bulk
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 working times for past dates are no longer needed and nothing is scheduled on them any more.
How oftenOn demand, when calendar working times for past periods have built up.
Batch settingsRun it in the background outside working hours when many calendars are cleaned.
What the output showsCalendars without working times before the date you entered. Gaps in a schedule after the run usually mean the date was set later than intended.

Source: Microsoft Learn

Setup steps on this page

Clean up old calendar working times

Delete working hours before a date to keep calendar data small.

Steps from Microsoft

  1. Go to Organization administration > Periodic > Calendar cleanup.
  2. Enter the date in Delete working times until. Working hours before this date are deleted; hours on the date itself are kept.
  3. Select Filter to limit the run to certain calendars and leave the others untouched.
  4. Pick a date before the earliest order or project that is still scheduled on those calendars.
  5. Run it, then open the working times of a cleaned calendar to confirm that nothing before the date remains.

Source: Microsoft Learn

Common errors and fixes

MessageWhat to do
Gaps appear in the schedule after the cleanupThe end date was later than intended. Recreate the working times for those dates on the calendar (Working times) and reschedule the orders. Microsoft Learn

Test checklist

  1. The filtered calendars have no working times before the date you entered.
  2. Working times on and after that date are unchanged.
  3. Calendars outside the filter are untouched.

Source: Microsoft Learn

Functional consultant

4Setup decisions

Setup stepRecommended value and whyDecision, common mistake and test
Clean up old calendar working timesAn end date before the earliest order, project or job still scheduled on the filtered calendars, run in the background outside working hoursAll working hours up to, but not including, the date are deleted, and scheduling needs working times for the dates it plans on.How far back should working times be kept?Running it with no calendar filter and a recent date, which deletes working times that open orders are still scheduled on.Test: Old working times are deleted up to the date

Feature management and licence

Licence or add-inOn this system the page opens for Production manager, Project manager, Production supervisor, Process engineer and Service delivery manager. No Feature management feature needs to be turned on for this page.

Microsoft Learn

Solution architect

5Design impact

Shared or per companyDeletes working times only for the calendars in the filter; other calendars are untouched. Microsoft Learn
Can it be undoneNot reversible: Deleted working times can't be brought back by the job; they must be created again on the calendar.
If you change it laterWorking hours before the end date you enter are deleted; hours on the end date itself are kept. Microsoft Learn
Technical architect

6Technical

Menu itemaction:WorkCalendarDelete Checked in Dynamics 365
FormDialog Checked in Dynamics 365
Who can open it

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

  • RolePayroll administratorHcmPayrollAdministrator
    • DutyMaintain calendar masterWorkCalendarMasterMaintain
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
    • DutyEnable calendar management processWorkCalendarsEnable
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
  • RoleProcess engineerRouteProcessEngineer
    • DutyMaintain calendar masterWorkCalendarMasterMaintain
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
    • DutyEnable calendar management processWorkCalendarsEnable
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
  • RoleProduction managerProdProductionManager
    • DutyMaintain calendar masterWorkCalendarMasterMaintain
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
    • DutyEnable calendar management processWorkCalendarsEnable
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
  • RoleProduction supervisorProdProductionSupervisor
    • DutyMaintain calendar masterWorkCalendarMasterMaintain
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
  • RoleProject managerProjProjectManager
    • DutyMaintain calendar masterWorkCalendarMasterMaintain
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
    • DutyEnable calendar management processWorkCalendarsEnable
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
  • RoleService delivery managerSMAServiceDeliveryManager
    • DutyMaintain calendar masterWorkCalendarMasterMaintain
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
    • DutyEnable calendar management processWorkCalendarsEnable
      • PrivilegeDelete calendar working timesWorkCalendarDeleteProcess
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 itProduction manager ProdProductionManagerProject manager ProjProjectManagerProduction supervisor ProdProductionSupervisorProcess engineer RouteProcessEngineerService delivery manager SMAServiceDeliveryManagerGive people one of these roles. On this system, 6 roles can run this page.Checked in Dynamics 365
Developer

7Developer

Open it by URLhttps://<your-environment>/?mi=action:WorkCalendarDelete
Data migrationLoad order: Calendar cleanup has no data entity in Data management, so it can't be loaded from a file or a configuration template. The job deletes data and stores no setup. Calendars move with the Calendar entity (WorkCalendarEntity).Checked in Dynamics 365
Everyone

8Sources

To cite this step: OA-JOB-780, Clean up old calendar working times. Beyond ERP Atlas Hub. https://www.beyonderp.cloud/atlas/step/OA-JOB-780