Sunday, January 8, 2017

Automatic Clean Up of Alerts

Alerts in AX can be a beautiful thing, but sometimes unused alerts can be ignored and build up in the system's EventInbox, causing issues and system latency if it gets too out of hand. You might have a problem when you are looking at someone's PC and they have 14,236 unread alerts in AX. Do not fear though! There is always an answer to these types problems and I have come across a beauty that I am going to share.

Alerts are something that your System Administrator should be cleaning up on a regular basis in System administration > Periodic > Notification clean up. This opens a notification clean-up tool that will clean alerts from every user's alert inbox when it is run. 

An issue arises when the System Administrator goes to run the clean-up tool and if they clean it out as of right this minute, someone might miss an important alert. So the System Administrator has to set up some parameters of when it might be appropriate to clean up alerts and how far back they need to go. 

When I first started cleaning up alerts in my AX environment, I had a reminder in my calendar to clean up alerts every Friday and I would set it with the following parameter so that it would clean up alerts from three weeks prior and older. 

Screenshot of Notification Clean-up with parameters set: Alert created date and time <"12/19/16 01:00:00 pm"
Imagine I am running this today to clean up everything older than three weeks in EventInbox.

This was working pretty well until I stumbled upon this gem in MSDN and put it into place:

I set it to run as a recurring batch job every month on the last Friday of the month. It will clean up anything older than one month prior to the last batch job running and newer than two months. So, prior to setting this up, run a complete batch job to clean any old data out of the system, then set this up to run on the schedule you want. I now receive an alert that this was run on the last Friday of every month, and seeing this alert pop up makes me smile. 

This keeps my EventInbox clean and doesn't rely on me to be available when my calendar alert pops up reminding me to clean up alerts in AX. It's been a great tool to have and I am glad that I have this blog to be able to share this type of information with you! I hope you find this helpful as well. 

No comments:

Post a Comment