One of the most common requests in the xRM world (Download our white paper, Extending CRM: Utilizing xRM to expand your relationships, to learn more on this topic.) is to view a list of records along with the last-most activity action against that record. Interestingly enough, Microsoft Dynamics CRM hasn’t provided an out of the box feature to support this request.
In this blog, we’ll step through a set of customizations to provide this feature. As always, it’s imperative that we automate as much of these requests as possible. Giving the end user information that for which they don’t have to work is always a ride in the fast-lane towards user adoption. For this exercise, we’ll ensure that the last most appointment, phone call, task and email activity modified for an opportunity is stored on that opportunity record.
Create three fields on the Opportunity to store the date, subject and a link to the activity.
On the Opportunity entity, create three fields as outlined below. For the Last Activity field, set the format to URL.
For each of the activity types, create a real-time workflow that fires on edit of activity.
For our example, we’ll create a workflow against the Task entity. These steps can be replicated for all other activities.
- Create a new workflow against the Task entity.
- Once created, click the “Convert to a real-time workflow” button at the top.
- Click the “Record is created” checkbox.
- Click the “Record fields change” checkbox, then click “Select” and select all fields.
- Click “Save” to save your changes.
Update the related Opportunity with fields from the activity
We need to ensure this workflow continues only when the activity is created against an opportunity.
- Click Add Step, Check Condition.
- From the query window, select Regarding (Opportunity) -> Opportunity -> Contains Data
- Click Save and Close
Now set the appropriate fields on the Opportunity record.
- Click Add Step, Update Record
- Select Regarding (Opportunity)
- Click Set Properties
- Update the respective Last Activity fields from the related task fields using the Form Assistant.
- For the Last Activity field, select the Record URL(Dynamic)(Task) dynamic value.
- Click Save and Close
Display the Last Activity fields on the form or in a view.
The Last Activity fields can be placed on the form or added to a view. For the form, ensure the fields are wide enough to display the necessary text.
Adding the fields to a view allows for a snapshot view of any opportunity and the last-most activity. The user can easily sort by the Last Activity Date to see opportunities with little activity. With the addition of the Record URL for the last most activity, the user can open the related activity right from this view by clicking the URL.
Note that the Last Activity Date can also be used with additional workflows to send an alert (email) if an Opportunity becomes stale. We’ll leave this additional workflow as an exercise for the user.
RSM offers customized training as well as other services for Microsoft Dynamics. If you are interested in assistance with conducting a Microsoft Dynamics CRM training or implementation, please contact our professionals for more information on our services at 855.437.7202 or firstname.lastname@example.org. If you like these tips, you may consider subscribing to our Dynamics Community News publication.
By: Valter Herman – Colorado Microsoft Dynamics CRM partner