Microsoft Dynamics 365(CRM) Tips and Tricks » Waiting Workflow In Dynamics CRMhttps://www.inogic.com/blog
By InogicTue, 14 Aug 2018 10:37:00 +0000en-UShourly1http://wordpress.org/?v=4.0Effect of Various Date Fields on Waiting Workflow in Dynamics CRMhttps://www.inogic.com/blog/2016/06/effect-of-various-date-fields-on-waiting-workflow-in-dynamics-crm/
https://www.inogic.com/blog/2016/06/effect-of-various-date-fields-on-waiting-workflow-in-dynamics-crm/#commentsWed, 22 Jun 2016 13:29:10 +0000http://www.inogic.com/blog/?p=3125Read More »]]>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.

Below are properties of above specified attributes.

Date N Time: Behavior: User Local, Format: Date and Time.

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

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

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

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.

Date N Time:

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

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

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

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

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

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

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

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

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

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

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).

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

Below are values updated for the Attribute “TZDateNTime”.

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

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

Below are values updated for the Attribute “TZDateOnly”.

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

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.