locked
CRM 2013: How to change Filter On: Next 30 days to All RRS feed

  • Question

  • Using CRM 2013, is there a way to change the default Activities view to All instead of 30 days?


    leeym27

    Monday, December 16, 2013 8:02 PM

Answers

  • I lost you at step #3. I clicked in Settings > Customization > Solutions. In this window I don't see anything that resembles "customize the system"

    Thoughts?


    leeym27

    • Marked as answer by circulent Wednesday, December 18, 2013 6:56 PM
    Tuesday, December 17, 2013 5:21 PM

All replies

  • Be default it is set to All. But if it is set to 30 days at your end you can change it by following the steps.

    1. From the top bar select setting

    2. go to customization 

    3. select customize the system

    4. then from opening window select entities.

    5. find Activities.

    6. Select views.

    7. Select your preferred view and from the top find more actions.

    8. there you will fine set default



    • Edited by Ali Mohsin_ Wednesday, December 18, 2013 7:28 AM grammatical
    • Proposed as answer by SonalS MSFT Sunday, December 22, 2013 2:23 PM
    Tuesday, December 17, 2013 8:50 AM
  • I lost you at step #3. I clicked in Settings > Customization > Solutions. In this window I don't see anything that resembles "customize the system"

    Thoughts?


    leeym27

    • Marked as answer by circulent Wednesday, December 18, 2013 6:56 PM
    Tuesday, December 17, 2013 5:21 PM
  • Hi,

    Code for Set the default View to "All".

    Call this function on Form Load.

    And pass Parameter name with entity name in which this view will be set Like.."Contact"

    function SetView(e) {
        SetDefaultView = function (e, t, n) {
            if (e.value != t) {
                e.value = t;
                n.RefreshGridView()
            }

        };
        areaActivitiesFrame_OnReadyStateChange = function () {
            if (this.readyState == "complete") {
           
                var t = document.frames("areaActivitiesFrame");
                var n = "crmGrid_" + e + "_ActivityPointers_datefilter";
                var r = t.document.getElementById(n);
                var i = t.document.getElementById("AppGridFilterContainer");
                if (r.readyState == "complete") {
                    SetDefaultView(r, "All", i)
                }
                else {
                    r.onreadystatechange = function () {
                        if (this.readyState == "complete") {
                            SetDefaultView(this, "All", i)
                        }

                    }

                }

            }

        };
        if (document.getElementById("navActivities") != null) {
            document.getElementById("navActivities").onclick = function () {
                loadArea("areaActivities");
                document.frames("areaActivitiesFrame").document.onreadystatechange = areaActivitiesFrame_OnReadyStateChange
            }

        }

    }

    Wednesday, December 18, 2013 6:02 AM
  • I've edited the answer.
    Wednesday, December 18, 2013 7:29 AM
  • This sets the default view but it does not set the view to all for the various accounts/contacts. The javascript solution was proposed for 2011. However, for 2013, do you still have to do this or is there another way?
    Monday, April 14, 2014 3:59 PM
  • Hi spbrian and circulent,

    I have tried the below code with CRM 2013 and can confirm that it works.

    You can create a Web Resource with the following Java script.

    /default the Activities 'Filter on' to 'All' for Account and Contact for rollup 12  function filterAllActivities() {     document.getElementById("navActivities").onclick = function () {         Mscrm.Details.loadArea(this, "areaActivities");         document.getElementById("areaActivitiesFrame").onload = function () {             var entityName = Xrm.Page.data.entity.getEntityName();             var entity = entityName.charAt(0).toUpperCase() + entityName.substr(1);             var doc = this.contentWindow.document;             var filterOn = doc.getElementById("crmGrid_" + entity + "_ActivityPointers_datefilter");             filterOn.value = "All";             var evt = document.createEvent("HTMLEvents");             evt.initEvent("change", false, true);             filterOn.dispatchEvent(evt);          };     }; }

    Once the changes are published the above function should be added to your Account/Contact forms OnLoad event.  Then just call in the ‘filterAllActivities” function. Please note that you don’t need to pass any parameters for this.

    http://community.dynamics.com/crm/b/magnetismsolutionscrmblog/archive/2013/01/11/default-activity-filter-on-to-all-dynamics-crm-2011-ur12.aspx

    • Proposed as answer by Eranger Tuesday, April 15, 2014 5:28 AM
    Tuesday, April 15, 2014 5:28 AM
  • This seemed to have worked for me. However, it did not seem to work for another person at our firm. Any ideas as to why it is now working for me but not for colleagues?
    Wednesday, April 16, 2014 4:28 PM
  • This can fail for others depending of the IE version they are using.

    Arpita

    Friday, February 6, 2015 7:52 AM
  • I tried the above code mentioned by  Eranger and it worked for me in CRM 2013 IE11.

    Arpita

    Friday, February 6, 2015 7:55 AM