Effect of Various Date Fields on Waiting Workflow in Dynamics CRM

By | June 22, 2016

There is a common requirement to create a workflow which should wait until date specified for a field and perform remaining operation once it is elapsed. One of the familiar example of that is Birthday reminder.

We came across a requirement where we needed to create waiting workflow till specified date in a field and create a record after that. This was creating records at random time.

We reviewed this in detail and found that even though we have specified only date (Date Only) workflow, still it considers the time and the waiting workflow waits until date and time matches.

We have reviewed the fields for the same for Dynamics CRM 2016 by creating few sample attribute and workflow.

We have created below date fields to review.Date Fields 1

Below are properties of above specified attributes.

  1. Date N Time: Behavior: User Local, Format: Date and Time.
  2. Date Only: Behavior: User Local, Format: Date Only.
  3. Date Only 16: Behavior: Date Only, Format: Date Only.
  4. TZDateNTime: Behavior: Time-Zone Independent, Format: Date and Time.
  5. TZDateOnly: Behavior: Time-Zone Independent, Format: Date Only.

We have created waiting workflows for each of the above specified attributes, which will create an email 2 minutes after the date specified in respective attributes. And then we reviewed their completion Date and Time.

  1. Date N Time:Date n Time 2

Below are values updated for the Attribute “Date n Time”.

Below is the Workflow completion date and time for these records.

Workflow completion 3

This works correctly and as per workflow it is completed 2 minutes after the date and time matches.

  1. Date Only: Behavior: User Local, Format: Date Only.

Below are values updated for the Attribute “Date Only”.Date Only 4

Below is the Workflow completion date and time for these records.

Workflow completion date and time 5

This works correctly since the format for the field is Date only, workflow executes at start of the day.

  1. Date Only 16: Behavior: Date Only, Format: Date Only.

Below are values updated for the Attribute “Date Only 16”.values updated for the Attribute 6

Below is the Workflow completion date and time for these records.

Workflow completion date and time 7

For the above example it went wrong and instead of executing workflow at start of the day. Workflow considers time as well (Time at which fields are updated).

  1. TZDateNTime: Behavior: Time-Zone Independent, Format: Date and Time.

Below are values updated for the Attribute “TZDateNTime”.TZDateNTime 8

 

Below workflow completes on respective UTC time that is 10.30 (IST 4:00) and 11.00 (IST 4.30).

workflow completes on respective UTC time 8

 

  1. TZDateOnly: Behavior: Time-Zone Independent, Format: Date Only.

Below are values updated for the Attribute “TZDateOnly”.TZDateOnly 9

As shown below it still considers the time and process according to that instead of start of the day.

CRM 2016 10

For CRM versions earlier than CRM 2016, only two formats are available, Date Only and Date Time. So even though Format selected for attribute is Date only it considers Time as well.

We faced issue for CRM version 2015 and we have resolved it by creating a new field in which time set as 12.00 AM to trigger the workflow at start of the day.

Conclusion:

For Dynamics CRM, even though date field format is set to date only, for few behavior CRM considers time as well.

Have you tried new Maplytics?…if not, Download your free trial today!

Leave a Reply