Thursday, December 3, 2009

How to change due date filter default value for activities page:


Sometimes you need to define your default filter values for the home activities page.


Here is an example how to change due date filter default value:

Add this code to "\CRMWeb\Workplace\home_activities.aspx" page:

<script runat="server">
protected override void OnPreRender(EventArgs e) {
base.OnPreRender(e);
this.crmDateSelector.Selected = "Today";
this.crmGrid.Parameters.Add("scheduledend", "Today");
}
</script>

You can set these values to the crmDateSelector control:
Overdue
Today
Tomorrow
NextXDays;7
NextXDays;30
NextXDays;90
NextXMonths;6
NextXMonths;12
All

thanks,
Max Shafranski,
Team blog member.