CRM 2017 Agenda - how to default Status filter to 'Pending'

This question is not answered

I launch In-line Customization mode for Screens and go to the Agenda tab however the Customize Screen hyperlink doesn't display so I assume there's no way to write Create Scripts on the three filter buttons.  Is there some other way to accomplish this?  My users prefer to see only Pending communications, but allow to over-ride and show either All or Completed - just as the old Filter panel used to work.

All Replies
  • I don't think there's a prescribed way of doing this. So we will probably veer into 'sledgehammer to crack a nut' territory rather quickly....

    The calendar - as has been alluded to in some of my posts passim - isn't built in the same way as other CRM screens. It can really be considered as being its own MVVM Single Page App, and as such all the normal CRM rules of client-side manipulation go merrily out of the window. What we have to bear in mind here is that we're dealing with data binding, so it's not going to be quite as simple as setting a field value. You can probably do something, but your clients are going to really want it!

    Here's some horribly clunky code that maybe can act as a POC if you want to investigate further:

    $(document).ready(function () {

      var btn, sSpan, tSpan;
      var defaulted = false;
      var _action = crm.getArg("Act");
      if (_action === "2300") {
        var scheduler = $("#scheduler");
        scheduler.bind("DOMSubtreeModified", function () {
          if(!tSpan || tSpan.length === 0){
            tSpan = $("#typeSpan");
          if (!sSpan || sSpan.length === 0) {
            sSpan = $("#statusSpan");
          if (!btn || btn.length === 0) {
            btn = $("#view_agenda_btn a");
          if (btn.length > 0 && btn.parent().hasClass("k-state-selected")
                                  && sSpan.length > 0 && tSpan.length > 0) {
            var statusFilter = $("#status").data("kendoDropDownList");
            if (!defaulted && statusFilter.value() != "Pending") {
              defaulted = true;

    First : where does this code live? As there's no 'hook' point for us to get a script into the screen itself, we need to put this into a .js file under the WWWRoot/js/Custom folder (then restart the App Pool so it loads).

    Second : How does it work? As the code is global, it'll run everywhere - so the first thing to do is test that we're in the right place, hence the test for Act === 2300. The next problem we have is that the calendar isn't loaded by the time $(document).ready() fires, hence the binding to the DOMSubtreeModified event to wait for all the relevant bits to load up. Once this happens then we need to convince the databound model that something in the UI has changed - that's where I'm setting the statusFilter.value to "Pending" and invoking its 'change' event.

    Third: It only does half a job. It'll work the very first time you go to the Agenda page, but you'd have to add extra stuff to handle subsequent clicking of the day/week etc buttons so you can do the same thing once you move off Agenda and come back to it.

    Chances are there might be a cleaner way to do it - I'd put money on it - but I've not used KendoUI (the framework in use here) at all, so am radiantly ignorant as to its inner workings.

  • As some additional background...

    There will be some other changes to the calendar going into Sage CRM 2018 R1 that will be out by the end of the calendar year. BUT if you want other enhancements then you will need to contact your local product manager.  Because Sage CRM is now developed as integrated CRM (the Sales, Marketing and Customer Service modules of Sage BMS systems like Sage 100, Sage 200 or Sage 300) you will need to lobby hard on improvements you want and link the feature to license/subscription sales.

  • Chris, that was one of the more helpful and also amusing forum posts I've come across in a long while.  Jeff Richards has a little competition, I'd say!  :)

    Seriously though, thanks so much for taking the time to share all of this.    

  • Hi Jeff.  I've shared your response with my user.  His (highly edited) response is that he's been using CRM systems since the 80's (ACT!, SalesLogix, CRM) and that filtering a Calendar to only show Pending activities, and sorting list columns such as the Agenda displays - he views this functionality as essential for any CRM system, irrespective of whether its integrated or stand-alone, hosted or on-premises, per seat or subscription.

  • You could always go back to the previous calendar by making a tab and building it like the old calendar, action other, system act communicationlist.  The new calendar has been a challenge to implement as you speak of.

  • Hi

    The ability to filter by Pending for Agenda and Tasks was added back in 2018 R1, which will very shortly be available in all regions.