Using Workflow to add Last Activity Date to a Case

Summary: Using workflow to update the Last Activity Date on a Case
Article Type: Information / Troubleshooting / Support
Related Product(s): This article relates to the following products:

Related Articles:  Blog article – Last Activity Date in Dynamics 365 – Rollup field vs Workflow



It’s important to maintain communication with your customers and keep to your published SLA’s.  Knowing the date of the last activity of a case will give you the ability to respond before it is too late.

In this scenario, we want to know when the last activity was completed, for each of my open cases.  We are going to use a workflow to populate the case with the actual end of the phone call, when it is completed.  This means we will need to create a workflow for each activity type.  Here are the steps to make this happen:

Adding a new field to the Case entity

  1. First of all, log in to Dynamics 365 as a system administrator or system customiser.
  2. Navigate to Case in the customisation area and create a new field.Create new field
  3. Give the field an appropriate name and set the Data Type as Date and Time.
  4. Set the Format to Date and Time.Last Activity Type Detail
  5. Click Save and Close, and publish the changes.

Creating a workflow to update Last Activity Date

    1. Navigate to the Processes area and create a new workflow for the phone call entity.
    2. The trigger for the workflow should be set to Record is created and Record status changes.
    3. You will need to add a couple of check conditions. First one is to check the status. The second is to check if the phone call is regarding a case.
    4. If both conditions are true, use an update step to populate your new Case (Last Activity Date) = Phone Call (Actual End). Workflow - Record Update
    5. You may want to close the conditions by cancelling the workflow.
    6. It should look something like this:

Workflow Criteria

 

…and finally

You can repeat workflow steps for each activity type you associate to a case.  Every time an activity is completed, a workflow will run and populate the Last Activity Date.  You can add this field to the form, the views, and even use it to trigger other workflows.

Related Information: