Real-Time Workflow Processes and Microsoft Dynamics CRM for Outlook Offline Mode

Colin Maitland, 17 June 2014

In this blog I will discuss when Real-Time Workflow Processes are executed when using Microsoft Dynamics CRM for Outlook in Offline Mode.

In Microsoft Dynamics CRM, Workflow Processes are not executed when using Microsoft Dynamics CRM for Outlook Client in Offline Mode. However, with the release of Microsoft Dynamics CRM 2013 the ability to execute Workflow Processes in Real-Time, in addition to in the Background, was introduced. This poses the question of whether or not Real-Time Workflow Processes are triggered in real-time when a User is using Microsoft Dynamics CRM for Outlook in Offline Mode?

In this blog I am using a sample Real-Time Workflow Process that checks if the City field on a Contact record is blank after it has been changed. If the City field is blank, a Business Process Error is then displayed as shown by the following screenshots:

Before Change

 After Change

After Save




The following screenshot shows the design of this sample Real-Time Workflow Process:




This example is not suitable for real-life because field changes are best validated after the field is changed and before the record is saved rather than after the record is saved. This example is configured this way because although it is possible to configure Real-Time Workflow Processes to Start Before rather than Start After a change to field the Start Before option causes the value of the field before it was changed to be used rather than the value of the field after it was changed.

In real-life these other options such as the following would be a better: 

  •  Configure the City field as a Business Required field.

  •  Create and Activate a Business Rule.



  •  Write and add JavaScript to the Contact Form to be trigged by the Form On Save event. Note: JavaScript cannot be added to the City field On Change event if the composite Address field is used instead of the individual Address fields such as City.

  •  Write and Register a Plugin against the Contact Entity that to check the City field prior to the Contact being saved.

When using Microsoft Dynamics CRM for Outlook in Online Mode the Real-Time Workflow Process is invoked as soon as changes to the Contact are saved. If the City is blank the Business Process Error is displayed as shown in the previous screenshot.

When using Microsoft Dynamics CRM for Outlook in Offline Mode even though the Contact can be saved, the Real-Time Workflow Process is not invoked until the User attempts to Go Online. Then the Real-Time Workflow Process is invoked and if the City is blank the Business Process Error is displayed as a Data Synchronisation Error, as shown in the following screenshot, along with several options for resolving the Data Synchronisation Error:

With respect to the options available for resolving the Data Synchronisation Error, it is important to be aware of the fact that if the User chooses the Go online and do not save the changes to data offline option then no changes made to the Contact, in addition to the change made to the City ,will be saved! This means that if the User updated the Business Phone and added an Email Address in addition to clearing the City, then those changes to the Contact would not be saved either.

In conclusion the following points should be remembered with respect to Real-Time Workflow Processes when using Microsoft Dynamics CRM for Outlook in Offline Mode

1.  As with background Workflow Processes, Real-Time Workflow Processes are not executed until the User selects Go Online.

2.  If the Real-Time Workflow Process generates a Business Process Error, the Business Process Error will be displayed as a Data Synchronisation Error.

3.  When a Data Synchronisation Error is displayed and the User chooses the Go Online and do not save the changed to data offline option then no changes to the record will be saved, even if they are changes to other fields besides those that are referred to and used by the Real-Time Workflow Process.