|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
- First of all, log in to Dynamics 365 as a system administrator or system customiser.
- Navigate to Case in the customisation area and create a new field.
- Give the field an appropriate name and set the Data Type as Date and Time.
- Set the Format to Date and Time.
- Click Save and Close, and publish the changes.
Creating a workflow to update Last Activity Date
- Navigate to the Processes area and create a new workflow for the phone call entity.
- The trigger for the workflow should be set to Record is created and Record status changes.
- 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.
- If both conditions are true, use an update step to populate your new Case (Last Activity Date) = Phone Call (Actual End).
- You may want to close the conditions by cancelling the workflow.
- It should look something like this:
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.