Tuesday, February 10, 2009

Changing the schedule for the Deletion Service

I came across this tool the other day when I was asked by a client if it was possible to force the deletion service to run. When you delete a record in Microsoft CRM, most often the record is not deleted from the database but rather the deletionstatecode is set to 2 (This is not always the case so be careful in using this for reporting etc). When the deletion service runs it will remove the record from the database. After some investigation it looks like the deletion service runs every 24 hours. This means that when writing reports you need to make sure you exclude deleted records as it is likely there will be records with a deletionstatecode  of 2 in the database.

Currently the only way I know to force the deletion service to run on Microsoft CRM 4.0 is to stop and restart the Asynchronous Service. I have since found this tool that allows you to change the schedule and frequency of when the deletion service runs: http://code.msdn.microsoft.com/ScaleGroupJobEditor. This is useful when you need to ensure deleted records are quickly removed from the database :)

0 comments: