Waiting workflows in dynamics 365 are best suited in situations when it is required by the process to wait for a specific period of time duration before execution.
Basically, in waiting workflows, there has been always confusion between “Timeout” and “Wait” conditions. This is now pretty much clarified with one of our below requirements in Dynamics CRM.
The business requirement was to trigger the workflow on the create and update of a record, which will then send an email to the owner of a record. But the condition was to send the email only after 2 hours from the actual date and time set on the particular field of a form during record creation. This field may be updated to a new value as well. This forced to trigger the workflow both on create and update of the date field.
This situation arose a new problem that was obvious to happen. For example, when a record is created, our workflow gets triggered and the send mail process will wait in a queue to be executed after 2 hours from the value of the date and time field of the newly created record. Now, if someone updates that record, for example, soon after creating the record if the user identifies that the value of the date and time field is incorrect then, he would update that field. Which will again trigger the workflow and another send mail process will wait in a queue to be executed after 2 hours from the date and time value of the updated field. This lead to send the email more than once to the owner of a record.
The workflow step was created as below in the screenshot:
Below image shows the outcome of the workflow triggering twice and waiting in queue for the resources, that send two emails to the owner:
But I wanted only one email to be sent with the updated date in the date time field, and cancel the previous workflow that was already in a queue.
This was achieved by using one extra field called “count”. This field was incremented by 1, each time the workflow was triggered.
So, the new workflow processes as below in the given steps:
Thus the workflow was modified to have parallel wait branches.
Finally, the workflow steps were as shown in the below image:
Hence the latest instance of the process is only available in the waiting queue and the previous ones are canceled as shown below:
I hope this helps you!!
Insert data into Many-to-Many relationship in Dynamics CRM very easily & quickly, using the Drag and drop listbox.
Comply your Lead, Contact, and User entities of D365 CRM with GDPR compliance using the GDPR add-on.
Create a personal / system view in Dynamics CRM with all the fields on the form/s which you select for a particular entity using the View Creator.
© All Rights Reserved. Inkey Solutions 2020