Microsoft Dynamics 365 Blog

In previous post the solution was to run batch job Administration > Periodic > Notification clean-up as a part of your maintenance plan. Now we have follow up question: how to set up this batch job to remove messages older than 1 month.

To achieve it we can use static function monthRange (public static str monthRange(int relativeMonthsFrom = 0, int relativeMonthsTo = 0)) of class SysQueryRangeUtil. So now we can schedule Notification clean-up to run every month with following parameters:

monthRange

It will delete all notification between 2 month ago till 1 month ago

 

–author: Czesława Langowska

–editor: Czesława Langowska

–date: 10/Oct/2011

We're always looking for feedback and would like to hear from you. Please head to the Dynamics 365 Community to start a discussion, ask questions, and tell us what you think!