How to use a recurring Integration Endpoint for importing data
You are here
Notification Cleanup
Clean up your Event Alerts / System Notifications.
AX 2012 and Dynamics 365 for Finance and Supply Chain allows you to create alert rules for lots of different actions in the system. This could be for if a new customer is created, a sales order status advances to invoiced or some field is set to a specific value. These create records for end users to review. If users don't delete them, the records will hang around forever. However, if a end user does delete them, the record is simply marked as deleted rather than removed from disk. Microsoft has some functionality to assist with cleanup.
This will loop though the EventInbox records and delete the ones that match the given criteria. The two parameters control whether you want to clean up notifications based on a rule that was for an entire organization or just for a given company, defaulting to the company you are currently logged into. When notifications based on organization rule is checked, it will only remove EventInbox records that came from an event rule that is for the entire organization. I typically do not see organization wide rules so keeping this set to no is probably ok. Next is the checkbox for Notifications based on company rule. If this is set to yes, it will only evaluate EventInbox records that are from an event rule set for a specific company. This is typically 95% or greater what i see. Next, we'll want to filter what records are include. If we filter on "Deleted Alert" set to yes, this will only consider items that have been marked as deleted by the recipient. However, if you filter it on an alert created date time of dateget(-30), it will delete all records that are older than 30 days off. This is a trick from AX 2012 that still works even though its not widely published. Next, you can schedule it in batch every week and it will prune your eventInbox records for you so you can forget about it.
AX 2012
In 2012, this can be found in System Administration > Periodic > Notification Clean up.
Dynamics 365 for Finance and Supply Chain
This can be found in the same place as in AX 2012 and works the same.