In customer service, it is often important to see when a company was last contacted and by whom.
To find this information in Microsoft Dynamics CRM default setting, one has to check activities connected to the account and possibly even connected contacts and their activities. Needless to say, this entails a lot of time and effort. However, there is an easier way to get there – using two fields and workflows.
Here’s a step-to-step guide to displaying the lastest activity in a contact and connected account:
- First, create two new fields in the entities Account and Contact:
“Latest activity on” (date only) and “Latest activity by” (Lookup[user]).
- Add both fields to the corresponding forms and set them to ReadOnly.
- Create a process „Activity process 1.1 [Activity type] Set latest activity” in the category Workflow for every activity type (phone call, task, email, appointment etc.). These workflows should run in the background and should start only when a record is created.
Note: If you define the completion of an activity as the latest point of activity, the workflow may also start when the status of the data set is changed.
- Add a check condition „Check regarding“. It should check the related entity Regarding (Account) and the field Account using the operator Contains Data.
If they do contain data, the referenced account may be updated. Thus, the fields Created on and Created by of the corresponding activity are added to the newly created Account fields (step #1).
Note: Each activity must be related to an account or a contact, respectively. For a solution to this issue, see Extension #1 below.
- Now, add a conditional branch to step #4. It should check the related entity Regarding (Contact) and the field Contact using the operator Contains Data.
If they do contain data, the related contact may be updated. Enter the fields Created on and Created by of the corresponding activity into the contact fields created in step #1.
- To additonally display the latest contact activity in the contact, create a process “Activity process 1.2: Update account” in the category Workflow which is registered to the entity Contact. This workflow can run in the background, must be a child process and has no defined start event.
- Add a step Update Record to update the related entity Account Name (account) and update the account fields created in step #1.
This solution allows you to recognize at a glance when and by whom a company was last contacted!
The drawback that an activity’s reference must be tied to an account can be bypassed by extending all entities which are referenced in your company’s activities (e.g. Opportunites, Quotes, Cases etc.) by the two fields created in step #1. Additionally, the worfklow created in step #3 has to be extended by the checking condition which checks the Regarding. For this entity to be able to pass on information to the account, a workflow needs to be created for each referenced entity (similar to step #6).
Should an activity’s Regarding not be set, which happens often with emails, try the following: Extend the workflow from step #3 by a checking condition (see step #4) which checks the activity’s reference (Regarding) using the operator Contains Data. If it does not contain data, you may use the field “Sender” (for Contact) and “Senders Account” (for Account) to specifiy information concerning the latest activity.
Have fun customizing!