Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

CRM 4.0 - how to set 'Filter On' filter to value 'All' for Activities/History

a33ik Profile Picture a33ik 84,331 Most Valuable Professional
This script is based on amazing article of Michael Holne and updated for CRM 4.0.

Just insert following code to OnLoad event handler of form like contact and account.

function OverrideClickHandler(loadAreaId, comboname)
{
var navElement = document.getElementById('nav' + loadAreaId);
if (navElement != null)
{
navElement.onclick = function()
{
loadArea('area' + loadAreaId);
SetView(document.getElementById('area' + loadAreaId + 'Frame'), comboname);
}
}
}

SetView = function(Iframe, comboname)
{
if (Iframe != null )
{
Iframe.onreadystatechange = function()
{
if (Iframe.readyState == 'complete')
{
var frame = frames[window.event.srcElement.id];
var viewCombo = frame.document.getElementById(comboname);

if (viewCombo.readyState == "complete")
{
SetDefaultView(viewCombo, "All");
}
else
{
viewCombo.onreadystatechange = function()
{
if (this.readyState == "complete")
{
SetDefaultView(this, "All");
}
}
}
}
}
}
}

SetDefaultView = function(viewCombo, viewName)
{
if (viewCombo.value != viewName)
{
viewCombo.value = viewName;
viewCombo.FireOnChange();
}
}

OverrideClickHandler("Activities", "scheduledend");
OverrideClickHandler("ActivityHistory", "actualend");

This was originally posted here.

Comments

*This post is locked for comments