Home > Dynamics CRM > CRM 4.0 – Change The Default View In CRM 4.0

CRM 4.0 – Change The Default View In CRM 4.0

CRM 4.0 unfortunately (same with CRM 3.0) has the default view hard-coded inside the product for Activites associated with a Contact. Therefore we have to make a change to one of the server files in Microsoft CRM 4.0 to change the default value.  Our customer requested the default to show "All" instead of "Next 30 days". Which is a reasonable request.

Therefore with a small change (this is not supported) it is possible by following the steps in this article.

BEFORE: Default view is ‘Next 30 days’ as shown below:

AFTER:  Default view now is ‘All’ as shown below:

These are the steps to change CRM 4.0 to give you the default of "All"

  1. Navigate to the location on your CRM server: C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\_controls\appgridfiltercontainer
  2. Rename the file AppGridFilterContainer.htc  to Original-AppGridFilterContainer.htc  >> make sure no one is using your system!
  3. Download the following file: AppGridFilterContainer.zip
  4. Unzip the file (use: 7Zip or WinZip) and copy the extracted file to the same location on your CRM 4.0 Server as above i.e. C:\Program Files\Microsoft Dynamics CRM\CRMWeb\_static\_controls\appgridfiltercontainer
  5. Clear your Temporary Internet Files in Internet Explorer. For Internet Explorer 7.0 users go to ‘Tools’ > ‘Delete Browsing History’ and then select  ‘Delete Files ..’ under the heading ‘Temporary Internet Files’. This will clear any cached files. Stops you getting any unwanted scenarios when testing this change.
  6. Now you are ready to test your CRM instance for the default view change!

If you want to know what is changed between the file you downloaded and the file provided by CRM then you could use a file compare tool or simply see the change below:

BEFORE:

   1: if(!IsNull(oCtrl.DataValue))
   2: {
   3: oCallback(oCtrl);

AFTER:

   1: if(!IsNull(oCtrl.DataValue))
   2: {
   3: if(oCtrl.DataValue=="LastXDays;30" || oCtrl.DataValue=="NextXDays;30" || oCtrl.DataValue=="0")
   4: {
   5: oCtrl.DataValue = "All"
   6: RefreshGridView();
   7: }
   8: oCallback(oCtrl);

Hope that helps!

Greg Olsen
Yellow Duck Guy

Advertisements
Categories: Dynamics CRM
  1. Shan
    July 14, 2008 at 7:16 pm

    Hello Greg:
    I don\’t think that this a good place to make changes. You just made view looks like to show "All" but it still shows Last 30 days data. What\’s the point to make this change?

  2. Greg
    July 20, 2008 at 9:38 pm

    Thanks for your reply Shan,
    Changing the View to show "All" will allow the list to bring back All activities available.  If you set the DataValue to "All" and then call RefreshGridView(); then this will tell CRM to update the listing of its data in the list. Currently out of the box it defaults to \’Next 30 Days\’.I suggest you try it out for yourself to see the effects of the change. This will give you a good understanding of the change and the effect it has on the Default view available.Greg.

  3. Mac
    October 3, 2008 at 7:04 pm

    Hello Greg,Setting "All" is working great.In Marketing List Member i would like to change default view "All Members" to “Active Members”. Updated this code but it does not work. Do i missing some thing…. or is there any other way for 4.0 if(oCtrl.DataValue=="All Members" || oCtrl.DataValue=="Inactive Members" || oCtrl.DataValue=="0"){oCtrl.DataValue = "Active Members"RefreshGridView();}Thanks in advance-mac

  4. Chris
    April 1, 2011 at 7:40 am

    Thanks! I tried other fixes I’ve found on the web by coping and pasting, but you listing the file to transfer over was a life saver. Thanks again.

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: