Hello all,
I got a set of system jobs that are locked in 'In Progress', they are not preventing any workflows from executing, but I wish to clear them anyways. I am unable to cancel them via the UI and simply want them to go away as all of the related records have gone through their life cycles.
I have tried restarting the Asynchronous Service already, did not work.
The locked jobs are all related to 'System Events' meaning I have no idea the real origin of the job aside from a something happening on a source record.
So far it appears that the only way to clear these locked records is to turn off the Asynchronous service and then using SQL update the state to canceled. I realize that this change is unsupported by MS (Direct SQL Edit) but I don't see any alternatives. Is this truly the only way to do this, there must be a better approach?
Related SQL (Our problem records are isolated to DEC 29th)
use crm_mscrm
UPDATE AsyncOperationBase SET StateCode = 3 -- Completed
,StatusCode = 32 -- Canceled
WHERE (StatusCode = 20 -- In Progress
OR StatusCode = 0 -- Waiting for Resources
OR StatusCode = 22 -- Cancelling
OR StatusCode = 21) -- Pausing
and Convert(date, StartedOn) = '12/29/2017'