Now when customers give us that requirement of no custom coding in Dynamics CRM, we need to create these tasks or appointments as well as update them by only using workflows. These can become complex but once working can be very effective and can be updated easily once the initial design is in place.
**For this example we are going to be creating 4 follow-up tasks on the Lead when it is initially created and will be auto completing these when the Lead is Qualified or Disqualified. The follow up dates that were required for this example is:**
1st follow-up: Created the date the lead is created
2nd follow-up: Created 7 days after the 1st follow-up
3rd follow-up: Created 30 days after the 1st follow-up
4th follow-up: Created 60 days after the 1st follow-up
1. The first thing that we need to do is create date fields on the Lead in Dynamics CRM in order to allow for modification of the follow-up dates. In addition to the date fields you will need look up fields configured to the task activity in order to link the follow up task record to the lead. The final result should look something like this:
2. Now that you have created the appropriate fields we need to go ahead and begin creating the workflows in Dynamics CRM. The first workflow to be create is the one that will create all of the follow-up tasks. This workflow should be created as a real time workflow so that the dates and IDs will appear as soon as you save the record.
Lead Follow Up – Task Creation:
As you will see in the below example the first step is to populate the initial dates for the follow-up tasks. Then we begin checking at each step for a date. If the date field contains data then create the task first. Once the task has been created update the lead to populate the lookup field with the corresponding tasks ID as shown below.
3. Now that the follow up tasks have been created, we will need to account for a use that might want to change the date of the follow-up in accordance with their specific situation. This will require 4 different follow ups.
All of the below workflows trigger based on a change of the date of the corresponding follow up:
Update 1st Follow-up:
For this workflow, since the date was manually changed the first step is to update the 1st follow-up task start date.
Update 2nd Follow up:
This follow-up is going to work the same as the previous workflow where it will update the 2nd follow-up date and this will update the date on the 3rd follow up.
Update 3rd Follow Up:
This follow-up is going to work the same as the previous workflow where it will update the 2nd follow-up date and this will update the date on the 3rd follow-up.
Update 4th Follow Up:
This follow-up will only update the task associated with it and does not need to update any other follow-ups as this is the final follow-up. So there is only 1 conditional branch in the example.
4. Now that we have created all of our work flows and we have tested to ensure that they are working properly we need to create the workflow that will complete all of the open tasks if the lead has been qualified or disqualified.
Complete Tasks when Lead is Closed:
This workflow is going to be triggered when the status of the lead changes. Once the condition check has completed and the workflow identifies that the status equals qualified or disqualified all the tasks will then be completed.
1. Create a new lead, once you save the record check the follow-up section on the form to ensure that the follow-up dates have been populated and also that the follow-up IDs are present.
2. Hit refresh on the page or F5 to reload the page, check the activities section to ensure that the tasks are showing up.
3. Change the date on the 1st follow-up and hit save. Once the workflow runs you should see the dates of the 2nd, 3rd and 4th follow-ups updated.
4. Hit refresh on the page or F5 to reload the page. Check the activities section to ensure that the tasks have been updated accordingly.
5. Change the date on the 2nd follow-up and hit save. Once the workflow runs you should see the dates of the 3rd and 4th follow-ups updated.
6. Hit refresh on the page or F5 to reload the page. Check the activities section to ensure that the tasks have been updated accordingly.
7. Change the date on the 3rd follow-up and hit save. Once the workflow runs you should see the dates of the 4th follow-up updated.
8. Hit refresh on the page or F5 to reload the page. Check the activities section to ensure that the tasks have been updated accordingly.
9. Qualify the lead, once the opportunity has been created hit refresh on the page or F5 to reload the page and check in the activities that all of the follow-up tasks have been completed.
10. On a different lead disqualify the lead then hit refresh on the page or F5 to reload the page. Check in the activities that all of the follow-up tasks have been completed.
Again this can be a quite complex process but if you follow the steps we discussed it should work. If you run into any troubles you can always contact the Ledgeview Partners Support team and they can help you through the process and make sure your Dynamics CRM workflow is working properly to automatically create tasks.