Deleted Records hanging in there! Forcing the delete job

Here is a scenario for you to ponder..

  1. You have a separate database with accounts in them that need to be uploaded to MSCRM.
  2. You use the DDM or write your own application to load the data into MSCRM
    • You use the key (a GUID) from the data being imported as the new key in CRM. Yes you can pass in the key GUID you want to create the record for.
  3. You realize you need to make some changes.
  4. You delete the records in MSCRM using the screens
  5. You try the import and it fails telling you you have a duplicate key.
  6. You search the screens thinking you did not delete them only to find out you did.

What happens when you delete a record in MSCRM is that the record is flagged with a 2 in the deletion State Code and a daily job runs that will clean up and perform all of the deletions.

So no the question, how do you force the deletion job to run NOW.

Well it is not hard.

Run the following SQL on your SQL Server


UPDATE ScaleGroupOrganizationMaintenanceJobs 
SET NextRunTime = getdate()
WHERE OperationType = 14 

then restart the Microsoft CRM Asynchronous Service



I would suggest that after you are done you revisit this and set the next date/time to sometime in the evening well before backups so that the job runs normally after hours.

Bill Owens

Bill Owens

Bill Owens, CRM Practice Manager at Affiliated, is a seasoned technology and business consultant with more than 15 years of experience and leads the strategic growth and direction of Affiliated’s CRM practice. He is a proven expert at helping organizations succeed in the implementation and integration of on-premise and cloud-based Microsoft Dynamics CRM. Bill has been a featured speaker for several CRM local events and national conferences including CRM User Groups throughout Ohio and the CRMUG Summit. You can reach Bill at or (614) 973-5075.
No comments yet.

Leave a Reply

Capcha * Time limit is exhausted. Please reload the CAPTCHA.


Follow this blog

Email address