Microsoft Dynamics CRM 2011 has introduced the functionality to create recurring appointments within the application. One common business requirement that we have come across at PowerObjects is the ability to view Appointments and Recurring Appointments through Advanced Find or Views. Most business users want to see two views—one that displays Appointments and another that displays Recurring Appointments.
How do we separate those views in Microsoft Dynamics CRM 2011?
You may think that creating two views could by done by adding the filter criteria of Activity Type equals Appointment or Recurring Appointment. However, that won’t fetch the desired results.
When we run the Advanced Find on “Appointments,” Recurring Appointments also appears in the list. The results will display all Appointments and Recurring Appointments in a single view.
But when we run Advance Find on “Recurring Appointments,” it will only show the first one that was created. This means that the Appointments created in the recurrence series do not get flagged as a recurring appointment.
In order to fulfill this requirement, we can leverage the picklist “Appointment Type” on the Appointment entity. This picklist holds the following values:
- Not Recurring
- Recurring Exception
- Recurring Future Exception
- Recurring Instance
- Recurring Master
The logical name of this picklist is instancetypecode and the option values are 0 to 4 in the above order.
We can use these values to to filter out Recurring Appointment, hence there is no need need to do a filter on the Recurring Appointment activity type.
For example, if you select Appointment Type as Recurring Instance in Advanced Find, the results will fetch all instances of a Recurring Appointment Instance and this can be saved as a View.
So there you go! That’s how you can view either appointments or recurring appointments separately in Microsoft Dynamics CRM 2011.