Activities are set up in a bit of an unusual way in Dynamics CRM. You have Activity Types (Appointments, Phone Calls etc.) which have their own entities and there is also the Activity entity which holds common fields (Regarding, Subject, Actual Duration etc.) There is also the idea of an Activity Party. An Activity Party is any kind of a ‘person’ which can be associated to an Activity. So, for example, the Required field of an Appointment can be populated by a Lead, User, Account, Contact or Facility/Equipment. These are all Activity Parties, as is the owner of the Activity. In fact there are quite a few ‘Participation Types’:
- BCC Recipient
- CC Recipient
- Optional Attendee
- Required Attendee
- To Recipient
Activity Grid Issues
Where this can provide some problems is in Activity grids on Contacts and Accounts. For example, if we look at the Activities of Adrian via the Navigation Pane, we see an Appointment.
However, looking at the Activity Grid on the Contact form shows no Appointment.
The reason for this seemingly inconsistent behaviour? In this case, Adrian is a Required Attendee of the Appointment but it is not Regarding him. The ‘Open Activity Associated View’ looks for all Activities where Adrian is a Party. Unfortunately, when we add the Activity grid to the form, the only relationship we can use is the Activities(Regarding) so the Appointment is lost.
Because of the confusion this causes with users, I often remove the Activities grid from the Contact and Account form when implementing CRM.
Reporting on Activity Parties
There is also some limitations with Advanced Find in regards to Activity Parties. While we can perform an Advanced Find on Activities and use Activity Parties to define our filter, it is not possible to perform an Advanced Find directly on Activity Parties. So, while we can ask “Show me all Activities where Adrian has been a Party”, we cannot ask, “Who has been a Required Attendee for an Appointment in the past six months?” The best we can do is start at one kind of entity who can be a participant e.g. a Contact and then browse through to Activity Parties to answer this question but it means querying for Contacts, then Accounts, then Leads etc.
Another option is to use the Report Wizard. I have been disparaging of the Report Wizard in the past and maintain this position. For the average user, Excel reporting is more accessible and for developers, creating SSRS reports directly offers a lot more control and flexibility. In this case, as we cannot easily extract the information we need via an Advanced Find query, the Excel reporting option is closed to us and therefore the Report Wizard is our next best option.
Using the Report Wizard, we define the entities of interest for the report as, for example, Activities and Activity Parties.
From here we can add a list of Activity Parties directly to the report. In this case I have grouped them by their Activity Subject, but this is not necessary. You could just as easily group by Participation Type.
Once set up, the report can be run and the list of Activity Parties generated and exported, as required.
Activities and their associated records are set up a little strangely in Dynamics CRM, although they can be understood. If you are finding your Activity reports are not working as expected, it could well be the case that your reports are only looking for one kind of Participation Type and not all of them. Generally though, once you identify the cause for the misreporting, it is relatively easy, with a little creativity to extract the reports you require.