Certain entities that contain the activity roll-up feature, namely accounts, contacts and opportunities, are also equipped with a date filter that allows you to choose whether you want to see all the activities related to the record or just a selected subset. By default this is “Next 30 days”, but you also can choose between “Overdue” or “Next 12 months”, or just go for “All”. That’s the good news.
The bad news is that this piece of helpful functionality has remained uncustomizable throughout different Dynamics CRM versions. A lot of users were annoyed with especially the same filter in the associated history view, nowadays known as Closed Activities view in CRM 2011, which used to default to “Last 30 days” and hide away all but the most recent email threads, appointments and other information that you might have been searching for. You always had to change the filter manually to “All” to uncover the historical information about the relationship with the account or contact. However, this has changed now in the latest version and “All” has become the default filter (or should I say the filter is off by default).
That’s definitely a step towards the right direction. It’s not exactly what the response on Microsoft Connect suggests, which claims that “we’ve allowed a user to change the default filter for associated views in CRM 2011”. I’ve yet run into such a setting and neither has The Great Internet, unless Google is hiding such instructions or blog posts. It would be useful to be able to configure or remove filters that the end users don’t want to deal with, without having to resort to unsupported customizations.
Open vs. closed activities
History is one thing but it’s the future actions that matter the most. Until very recently, I’d say up until Update Rollup 2 of CRM 2011 the filter functionality in the open activities associated views used to be such that the default “Next 30 days” would also show any activity that was missing a due date. By default the due dates are not a required field and sometimes they are not that practical for the CRM users, as many things in the daily life of a modern information worker don’t have strict deadlines. Also, there’s no out-of-the-box functionality in Dynamics CRM to set default values for date fields either, so setting the exact due date for every task or phone call you enter on your task list may feel too bureaucratic. An activity with a missing date should be considered as “do this as soon as you can, given all the surrounding factors”, in my personal opinion.
In the current version of Update Rollup 5 the “Filter on” value is applied in such a way that it by default hides away all activities that don’t meet the “Next 30 days” criteria. If the due date is blank, the activities won’t show under the account/contact/opportunity. This may seem quite confusing to the user, since any new activity that he or she creates for the record will appear to “vanish” into thin air after clicking “Save and close”. In the My Activities view they will still appear on the top of the list, as null values in the Due Date column are sorted on top.
What’s even more confusing is that CRM 2011 introduces two different ways for users to navigate to related activities on the account form: the familiar associated view and the new subgrid. If you’ve been reading my blog, you’ll know that subgrids ain’t exactly what associated views used to be. They don’t contain the activity roll-up feature, so you won’t see those activities that are set regarding a child record of an account (for example, opportunities) instead of the account record directly. Just like another filter, except you can’t even change it.
How to change the default filter value
1. Create a new Web Resource of type Script (Jscript) and click the Text Editor button, then paste in the code from the above post.
2. Open the form customization window of the entity where you want to change the Activity view filter default. In this case we’ll do it on the account form. Select “Form properties” on the ribbon, click “Add” on the Form Libraries section and find the web resource you created in step 1.
3. Click the “Add” button on the Event Handlers section of the window to add a new entry for form OnLoad event. Select the library you created in step 2, enter SetView as the function field value and ‘Activities’, ‘All’, “crmGrid_Account_ActivityPointers_datefilter” in the parameters field.
4. Save & publish everything. Done! Just open an account form, navigate to associated activities view and witness the “Filter on” value being set to “All”.
When working with Contacts or Opportunities, just modify the third parameter value accordingly. If you want to set a different default value than “All”, the choices for the second parameter are ‘Overdue’, ‘Today’, ‘Tomorrow’, ‘NextXDays;7’, ‘NextXDays;30’, ‘NextXDays;90’, ‘NextXMonths;6’, ‘NextXMonths;12’. Once again, thanks to Andreas for providing us this script and the parameter values!
Just remember that it’s not a supported customization, so in case any of the view names change in future updates, you may need to modify the script. For instance, when I was testing on a system with Finnish base language, the view parameter was “crmGrid_Account_ActivityPointers_scheduledend” initially, but on an Update Rollup 5 system this appeared have changed globally to “crmGrid_Account_ActivityPointers_datefilter”.
If you’d rather see the Activity default filter being set to “All” in the Microsoft Dynamics CRM standard configuration, please go and vote on the related Microsoft Connect suggestion (Windows Live ID login required). Thanks.
Update 2013-01-13: With the cross-browser support delivered in Update Rollup 12, many of these unsupported scripts may break. Here’s a recent article on the awesome blog by the Magnetism team that talks about how to reset the filter to “All” in the new UR12+ environments. Still unsupported, but as the default filter remains unconfigurable and can cause important customer related tasks to go unnoticed, I think applying the customization is justifiable.