Microsoft Dynamics CRM Deletion Service
Roshan Mehta, 17 March 2010
Recently, I was working on importing Product, Unit, and Account information from a CSV file for one of our clients. I decided it would be faster to manually input the units into CRM, since there weren’t too many units to create. However, a colleague of mine suggested that it's good practice to create these records programmatically, so I deleted the unit records that I had created from CRM.
When trying to create the same units again from within CRM, the system notified me that the units already existed in the system, even though I had deleted them earlier. I tried a manual SQL SELECT from the database but this still showed zero unit records in the system. I had pondered over this for hours and came to the conclusion that perhaps the CRM Deletion Service had not kicked in yet. My colleague suggested I query the UomBase table, and sure enough, it returned all of the units that I had created earlier, but they were all marked for deletion.
I Google’d and found a script to force the CRM Deletion Service to start, and also restarted the CRM Asynchronous Service, but this had no effect. I then tried to perform an SQL UPDATE on the UomBase table to "unmark" each of the units for deletion. This worked perfectly, and the units were again visible from within CRM.