Microsoft Dynamics 365 CRM TipsThere are quite a few times when working a Microsoft Dynamics 365/CRM project with a customer that they specifically mention that they do not want any custom code, as they don’t have resources to update the code if something changes in the future.

In the past when we needed to create tasks or appointments automatically as part of a lead or opportunity we would have a developer create these with a plugin or JavaScript to allow for updates to the records if anything changed in CRM.

Now, when customers give us the requirement of no custom coding in Dynamics 365/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 they 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 2 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 are:

  • 1st follow up: Created the date the lead is created
  • 2nd follow up: Created 7 days after the 1st follow up

* Quick note on a best practice – it is generally not a good idea to have workflows in extended “wait” statuses.  There are a variety of issues that could arise to disrupt Dynamics 365/CRM (either online or on premise) that could cause waiting workflows to go in to a suspended status.

Setup Notes:

  1. The first thing that we need to do is create two date fields on the Lead in order to allow for modification of the follow up dates. In addition to the date fields, we will need look up fields configured to the task activity in order to link the follow up task record to the lead. The result would look something like the following.  If you needed three, four or more follow-ups, the logic can be easily extended.
    Microsoft Dynamics 365 CRM Workflows

  2. Now that we have created the appropriate fields, we can begin creating the workflows.

  3. The first workflow creates the follow up tasks. This workflow can be created as a real time workflow so dates and IDs will appear as soon as you save the record.
    Microsoft Dynamics 365 CRM Workflows

    The fields on the Lead form and the Tasks list might look something like this:
    Microsoft Dynamics 365 CRM Workflows Microsoft Dynamics 365 CRM Workflows

  4. The first workflow handles a date change in the first Follow-Up date.
    Microsoft Dynamics 365 CRM Workflows

    The revised values would look like the following if the first date was changed to 12/10/17.  In addition, the Tasks themselves would reflect these changes as well.
    Microsoft Dynamics 365 CRM Workflows Microsoft Dynamics 365 CRM Workflows

    The second workflow only needs to change the date on the second Follow-Up Task as this change doesn’t affect the first task.  It is a simple one-step workflow that triggers off a change in the second Task date field on the Lead form.

    Microsoft Dynamics 365 CRM Workflows

  5. Now that we have created all of our workflows to create/update Tasks, we need to create two workflows that will complete all of the open tasks if the lead is qualified, disqualified, or deleted. Since we want to handle deleted Leads, this will need to be a separate real-time workflow that runs before the Lead is deleted.Workflow for qualified/disqualified LeadMicrosoft Dynamics 365 CRM Workflows

  6. Now that the follow up tasks have been created, we need to account for a user that might want to change one or both of the task dates on the Lead form depending on their specific situation. This will require two different workflows, as we will need to not only update the task that has been changed but we also need to update the subsequent follow-up task. If we had these all within one workflow it could create an infinite loop.Microsoft Dynamics 365 CRM Workflows

If you would like to learn more about workflows in Microsoft Dynamics 365/CRM or find out tips, tricks, and best practices, attend our monthly User Group Webinars – they are open to any users of Microsoft Dynamics 365/CRM.

Contact Us Today

To learn more about Ledgeview’s Expertise

Related Articles

Read More