web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

How can I change the default "filter on" settings on Activity

(0) ShareShare
ReportReport
Posted on by 40

How can I change default filter on all activites "Next 30 days" to set to  "all"?

 Is it some kind of settings or it is a coding?

 

Any help or direction is appriciated.

 

Thanks.

 

*This post is locked for comments

I have the same question (0)
  • Leon Tribe Profile Picture
    7,034 on at
    Unsupported but it should work. //Activity scheduledend options var ActivityOptions = { All : "All", Overdue :"Overdue", Today :"Today", Tomorrow :"Tomorrow", Next7Days :"NextXDays;7", Next30Days :"NextXDays;30", Next90Days :"NextXDays;90", Next6Months :"NextXMonths;6" } //Activity History actualend options var HistoryOptions = { All : "All", Today : "Today", Yesterday : "Yesterday", Last7Days : "LastXDays;7", Last30Days : "LastXDays;30", Last90Days : "LastXDays;90", Last6Months : "LastXMonths;6", Last12Months: "LastXMonths;12" } var _loadarea = loadArea; loadArea = function(sArea, sParams, sUrl, bIsvMode) { //load the iframe _loadarea(sArea, sParams, sUrl, bIsvMode); if( sArea != "areaActivityHistory" && sArea != "areaActivities" ) return; //create the iframe object var iframe = document.getElementById(sArea + "Frame"); //wait until the iframe is fully loaded ("complete") iframe.onreadystatechange = function() { if( iframe.readyState == "complete") { var picklist,option; //reference to the iframe document var iframeDoc = iframe.contentWindow.document; switch(sArea) { case "areaActivityHistory": picklist = iframeDoc.all.actualend[0]; /* change to suit your needs */ option = HistoryOptions.All; break; case "areaActivities": picklist = iframeDoc.all.scheduledend[0]; /* change to suit your needs */ option = ActivityOptions.All; break; default: return; } picklist.value = option; picklist.FireOnChange(); } } } Leon Tribe Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
  • Ashish Udas Profile Picture
    40 on at

    Thanks Leon,

    Where do you want us to put this javascript , on load event of Activities form?

    I presume...

     

    Thanks a lot.

    AU 

     

     

     

  • Leon Tribe Profile Picture
    7,034 on at
    From memory it goes on the OnLoad of the parent entity detail form i.e. if you're looking at the contact activities, it goes on the OnLoad of the Contact Main Form. By the way not my code, just something I found on the net ages ago and kept around 'just in case'. Used it once with a client and seemed to do the trick. Leon Tribe Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
  • Pedram Soheil Profile Picture
    100 on at

    I found this same code on this blog:

     http://mscrm4ever.blogspot.com/2008/07/changing-activity-history-default-view.html

     The problem I am having though is that I am trying to customize the "Activities Lookup View" and the "Activities" Entity does not have a Form where I can add this code to its "OnLoad" event. Any idea?

     Thanks - Pedram

  • Leon Tribe Profile Picture
    7,034 on at
    That's almost certainly where I 'liberated' it from. Lookups are a problem and there are no supported methods for messing with them. Hopefully others can come through with the goods from a code perspective but I have a memory of people saying you can export out the entity, hack the xml and reimport. Might be worth a shot. Leon Tribe Want to hear me talk about all things CRM? Check out my blog http://leontribe.blogspot.com/ or hear me tweet @leontribe
  • Pedram Soheil Profile Picture
    100 on at

    The code does work for Related Activities under each entity (i.e. if you want the view under "Contact > (Details Panel) > Activities to select the "All" option). Thanks for the code!

    Pedram

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans