Personalized Community is here!
Quickly customize your community to find the content you seek.
Have questions on moving to the cloud? Visit the Dynamics 365 Migration Community today! Microsoft’s extensive network of Dynamics AX and Dynamics CRM experts can help.
2021 Release Wave 2Discover the latest updates and new features releasing from October 2021 through March 2022.
2021 release wave 2 plan
The FastTrack program is designed to help you accelerate your Dynamics 365 deployment with confidence.
FastTrack Community | FastTrack Program | Finance and Operations TechTalks | Customer Engagement TechTalks | Upcoming TechTalks | All TechTalks
If you have read some of my previous posts you will notice that I am a big fan of utilizing out of the box functionality within Microsoft Dynamics CRM before looking at custom or third party solutions. For example, I previously blogged about utilizing the Unique ID generation capabilities of Microsoft Dynamics CRM with any entity instead of just the few out of the box entities for which this functionality was intended.
Microsoft Dynamics CRM MVP Matt Wittemann (@MattNC) came up with a solution to schedule recurring workflows within Microsoft Dynamics CRM without implementing any custom or third party solution. I knew I needed to share this with the entire community.
First, let’s ask: Why would you need recurring workflows?
There are many cases when you find yourself thinking: “I need ‘this’ to happen every X days” and you don’t know how to solve the problem. For example: You need to email a summary of resolved cases every month to a group of people within the organization. Or maybe send some of your contacts a monthly or quarterly email containing the link to your latest product catalog. How about a countdown of ‘days until launch’ on a custom Project entity? There is always something.
This solution requires you to create a custom entity, a couple of workflows and a recurring bulk deletion job. Five steps, that’s it.
1. Customize the ‘target entity’ if necessary, for example: if you want to countdown the days until a project must be completed, you could add a field to a “project entity” named “Days until completion” to be set when the project is created and that will be edited daily by the recurrent workflow. In this case, the custom “Project” entity is the ‘target entity’.
2. Create a custom entity; in this case I named my entity: “Workflow Assistant”. This entity will contain the name field, owner, an optionset (a.k.a. drop-down menu) field and a lookup to the “target entity”. The Target Entity is any entity that drives the process.
3. Create a workflow triggered by the Target Entity (I.E. A new project has been created). This workflow will create a ‘Workflow Assistant’ record to be deleted by the recurring bulk deletion job you will create on step number 5.
4. Create a workflow triggered by the deletion of the Workflow Assistant record, this workflow will perform the recurring task and create a new Workflow Assistant record to be deleted on the next cycle thus making it recurrent.
5. Create a Bulk Deletion job set to delete the Workflow Assistant records created by the two workflows from step 3 and 4 and configure the frequency (I.E. Every 1 day).
Here is a diagram describing the process detailed above:
Unfortunately, there were a lot of details involved on the configuration of this functionality so I have decided not to include all the screenshots and make this post too long and cumbersome, if you need more details please watch the video below; I have also included two additional examples to illustrate the capabilities of this simple solution; on the first example I will show you how to configure a recurring workflow to count the days a Lead has been neglected (I.E. Not contacted), on the second example I will show you how to configure a recurring workflow to send a weekly sales pipeline report to selected users:
Hi Gus, Thanks for the nice description - I've pointed many people at this post! I implemented a workflow scheduler in one of the www.sparklexrm.com samples which uses the same technique.
Business Applications communities