Home > CRM > Executing Failed Workflow Async Jobs – CRM

Executing Failed Workflow Async Jobs – CRM

In my CRM application we trigger workflows on creation of Orders.

Other day because SQL server was down, there were 600 System Jobs failed with ‘SQL Time Out’ error.

Once SQL server issue fixed we had the problem of fixing failed workflow jobs, Since I cannot re-execute the failed jobs from the CRM ‘System Jobs’ UI, only way is to create 600 Orders again which was tedious.

After exploring I came to know that we can re-execute failed ‘System Jobs’ using ‘ExecuteWorkflowRequest’ SDK message.

ExecuteWorkflowRequest SDK message requires

  • WorkflowId
  • EntityId

Sample Code – 

// Create an ExecuteWorkflow request.

ExecuteWorkflowRequest request = new ExecuteWorkflowRequest(){

WorkflowId = _workflowId,

EntityId = _OrderId


// Execute the workflow.

ExecuteWorkflowResponse response = (ExecuteWorkflowResponse)_serviceProxy.Execute(request);

Refer article for source code and execution steps for failed jobs.


  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: