Calculating Upcoming Dates in D365

Calculating Upcoming Dates in Dynamics 365

A good CRM is about more than just having a sleek system for your employees. It should be a tool used to increase customer satisfaction. Efforts to show that you value your customers go a long way to retain loyalty. This is known as increasing your customer’s “lifetime value”, referenced in this article by Entrepreneur Magazine. One easy way to develop relationships with your customer is to send them an email on their birthday or for an anniversary. Microsoft’s CRM software can easily cater to this strategy.

Date fields in Dynamics 365 are a great way of storing historical information regarding a Contact, Lead, or Account. However, performing date calculation greatly increases their power and allows for more robust data analysis.

Currently, in CRM, you can’t query based on a specific month in the field. For example, you can’t query all contacts whose birthday occurs in the month of October because the advanced find always takes the whole date into account. Fortunately, there is an OOB way around this. This article will explain how to calculate upcoming anniversaries or birthdays in CRM.

Create “Date of Birth” Field

Create a new field on the Contact entity titled “Date of Birth”. The Behavior setting of the field must be User Local, which is why I am not using the OOB Birthday field. The OOB Birthday field Behavior equals Date Only, which will not allow us to do the date calculation necessary

Create “Age” Calculated Field

Create another field on the Contact entity titled “Age”. This field should be of Data Type “Whole Number” and Field Type “Calculated”. Below is the calculation:

Create “Upcoming Birthday” Calculated Field

Create a final field called “Upcoming Birthday”. The Data Type should be “Date and Time” with a Field Type of “Calculated”. Below is the calculation for this field:

Add Fields to Form

After this, put the Date of Birth, Upcoming Birthday, and optionally the Age fields on the Contact form. At this point, copy over data from the OOB Birthday field to the new one via a workflow.

Potential Use Cases

You can now create advanced finds to show you who in your database has a birthday in the next week, month, etc. You can also build workflows that reference the Upcoming Birthday field and send automated emails to people on their birthdays. Furthermore, you can use the Age calculated field to your advantage by creating marketing lists that are segmented by specific age. You could also use these methods to celebrate upcoming anniversaries of when a client partnered with your business.

For a reference on how to do this customization for CRM 2015/2016, as well as additional information, please refer to this blog post.

Learn more about Microsoft D365

Book a DemoLearn More