Views:

Applies to Product - Dynamics 365 Lifecycle Services


What’s happening?
Customers are inquiring about methods to clean up log/history data from the SYSEMAILHISTORY, EVENTINBOXDATA, and INVENTCLOSINGLOG tables, which are consuming a significant amount of space in the production environment.


Reason:

  • The SYSEMAILHISTORY and EVENTINBOXDATA tables can be cleaned up using specific batch jobs.
  • The INVENTCLOSINGLOG table does not have a cleanup job available from the front-end, requiring further assistance from the SCM team.
     
Resolution:
  1. For SYSEMAILHISTORY Table:
  2. Navigate to Email parameters under Configuration.
  3. Set the "Number of days to retain email history" to a desired value (e.g., 15 days).
  4. Initiate the batch job named “SysEmailHistoryCleanupBatch” to clean up the email history.
  5. For EVENTINBOXDATA Table:
  6. Refer to the document titled "Cleanup routines in Dynamics 365 Finance and Dynamics 365 Supply" for detailed instructions.
  7. Clean up this table via System administration → Periodic tasks → Notification clean-up job.
  8. For INVENTCLOSINGLOG Table:
  9. Since there is no existing cleanup job from the front-end, it is recommended to raise a new support ticket to the SCM team to understand the impacts and methods for cleaning up this table.
  10. Validation:
  11. After running the cleanup jobs, verify the results by checking the respective tables to ensure that the desired records have been removed. For the SYSEMAILHISTORY table, use the "View email history" form to confirm the cleanup.
  12. Additional Note:
  13. If there are a large number of records to clean up, it is advisable to schedule the cleanup jobs during off-business hours to prevent overloading the batch server resources.
  14. For further assistance:
  15. If issues persist or if there are questions about raising a ticket to the SCM team, please refer to the appropriate support area path for guidance.