Tracking Customer Last Contacted Date

Using Microsoft Dynamics 365 to track the Last Contacted Date

Often we receive a request to track the “Last Contacted Date” for a customer in Microsoft Dynamics 365.  Some Customer Relationship Management systems have this feature by default, but with Microsoft Dynamics 365 we need to build it ourselves. Fortunately, the platform is powerful enough to not only allow us to build this feature, but to govern it with specific conditions.

In this step-by-step, we will create a field named “Most Recent Contact” and then build simple logic behind that field to capture any activity that is related to the Account entity in Microsoft Dynamics 365, even if the activity is related to something “below” the Account, such as an Opportunity.


  1. First, create the field.  Note below the following:
    1. Data Type = Date and Time
    2. Field Type = Rollup
    3. Behavior = User Local (unless you have a need for date and time not tracked locally)
    4. Format = Date and Time (Date Only may be fine, but in this example, we want both the date and the time)

5. Click Save, then click Edit.

6. In the screen shot below, we are configuring this pretty simply. Here are the decisions we have made:

  1. We choose “Related: Activities (Regarding)” – this ensures that any activities created directly off the Account will inform this field.
  2. FILTERS (Optional) – we have none, but you should know that almost anything goes here, where you can decide that you only wish this to apply to completed activities, or perhaps activities of a certain type, etc. Choosing no filters like we have will result in all activities rolling up with the latest date.
  3. INCLUDE INDIRECTLY RELATED ACTIVITIES : Activity Parties (Activity). This is an important choice if you wish activities to count toward the Most Recent Contact not only directly related through the “Regarding” field, but through activities where the ACCOUNT is set as an Activity party.

IMPORTANT: For this Activity Party setting to work, the Account record must show up in the Activity Party (To: From:, etc. fields). For instance,  if the Activity is related through the Regarding field with an Opportunity, make sure the Account is added to the “To” field for this to work against the Most Recent Contact field.

4. FILTERS (OPTIONAL) under the Activity Party section you can place the same sort of filters as you can above so that the activity only applies under certain circumstances.  For this one, we leave it blank.

5. AGGREGATION – Max of Date Created.  Here we use the creation date of the Activity.  You can also use Actual End, if your staff is trained to “Complete” their phone calls. The way this is set up is that the date is set to when the user created the activity record.  What you use here depends very much on your business process. If people in your organization log their phone calls in real time, then Date Created may work. If your staff schedule calls for the future, then you may wish to use something like Date Due, etc.

7. Save the form and then Publish.

8. Test this by first creating an activity under the Account.

9. Then click the “Recalculate” icon on the field as shown below.

Once you click the icon to refresh the field you should see the date of the activity you just created (today’s date and time)

10. Repeat this with an activity that is regarding another record, such as an opportunity, but be sure to add the Account in the To field as shown below.

Return to the Account and check the field. You should see an updated value for this last Activity.*

*Again, remember that the Account must appear as an Activity Party (in the To or From) for this to work for activities that are not related directly to the account through the Regarding field.