105

Hi Team,


If you're having difficulty using the standard retention policy to cleanup large amounts of Change Log Entries.

  • you can either custom write code to do it, or
  • wait for Retention Policies to be fixed.


Suggestion for fix:

Since there are some timeouts happening on the jobs doing the cleanup I suggest the following:

  • Create an non-editable field on the Retention Policy page to store the last entry scheduled for cleanup
  • when filters are applied, create job queues to delete these entries in X entries increment. Hence if you have to delete 1 million entries you could create 10 jobs of 100k entries.
  • After setting up each job queue entry (up to 10 in the above example), give it a starting entry no and max no of entries to delete (100k in this example), setting the max hypothetical entry no deleted on the new field Last Entry Scheduled for Cleanup field in the Retention Policy card.
  • if you want to, you can even set up a new Job Queue Category code for this particular jobs, then monitor the execution of the jobs through a generic Job Queue Entry, which would monitor the entries above (10 in my example).


Thank you,

Robert Bulugea

Category: General
STATUS DETAILS
Needs Votes
Ideas Administrator

Thank you for this suggestion! Currently this is not on our roadmap. We are tracking this idea and if it gathers more votes and comments we will consider it in the future. Best regards, Business Central Team