locked
CRM 2011: Ribbon Buttons show up and are clickable before they are disabled by the Display Rules RRS feed

  • Question

  • We are getting complaints from users that when the ribbon is loaded, some buttons are disabled via display and enable rules, are in fact active for a few seconds while the display rules are being executed. So for a split second the users can actually click them before the page finishes loading.  We've never noticed this because it is so fast for us, but for users out in remote locations with very slow connection speeds, they are telling us that it gives them a second or so before the page disabled or hides the buttons.

    Why does CRM display the ribbon bar before the button commands are executed that control which buttons are displayed and enabled? Can I do something to better handle this situation?  Maybe set them to disabled as the default, then only enable them as needed? I see the default value there on the button, is that all I need to do is just set it to default to false?

    How do I get them to start off disabled and not be active during that split-second or so before being disabled?

    Best regards,


    Jon Gregory Rothlander




    Tuesday, November 25, 2014 7:12 PM

Answers

  •  I was able to resolve this.  The form load event was setting the button to enabled, then other functions controlled the disabling.  But setting it to disabled in the form_load, the issue seems to have gone away.


    Jon Gregory Rothlander

    • Marked as answer by jonrothlander Wednesday, January 7, 2015 7:16 PM
    Wednesday, January 7, 2015 7:15 PM

All replies

  • I suspect this is actually not possible and the users are just misunderstanding how things works.  I don't think there is a way to click on the ribbon buttons before the page finishes loading.  If anyone disagrees, I'll really like to know.


    Jon Gregory Rothlander

    Wednesday, November 26, 2014 8:52 PM
  • There is a possibility(5 out of 100%) of Users clicking the buttons before the page finishes loading. I had experienced the same when I have very slow internet connection and even I don't think there is a chance of controlling it.

    --

    Regards

    Gopinath.

    Thursday, November 27, 2014 5:14 AM
  • Thanks for your input.  I had decided it wasn't possible and maybe the users are just getting confused, but after you post, now I am not so sure.  If you had a similar experience, maybe there are some browsers, some versions of Outlook, etc. where this in fact is the case. 

    Did you try to set the enabled rule to default to false?  I haven't tried that yet, but that was one of my thoughts.  I'm just wondering if there is some way to force it to default to a disabled state, then only enable it if needed.  however, front what I see, it is always loading the state it was in the last time it the user opened it.  I assume it is being cached. 


    Jon Gregory Rothlander

    Tuesday, December 2, 2014 7:22 PM
  • It seems to occur when I open an active Lead and then close it, then open an inactive Lead, the ribbon is first loaded from cache in the state it was last opened. So it first shows up with the Lead in an active state. Then if I just start clicking the buttons, it will eventually fire off the button-click, then after the enable rules run, the buttons are disabled. So in reality, if you use display and enable rules on your buttons, that just means the user can still click them, they just need to be fast at it.

    This is a bit odd, as you'd guess that Microsoft would have written the ribbons-button in such a way as to not let them be active until after the page finishes loading, or at least until after the display/enable rules are executed.

    I am trying to work through some JavaScript to disable these two buttons immediately, using JavaScript document.ready function, as follows.  Hopefully this will work.  But I'd like to know if others have ran into this and how they dealt with it.

        var w = top.document.getElementById("lead|NoRelationship|Form|Mscrm.Form.lead.ReactivateLead-Large");
        x.style.display = 'none';

    Jon Gregory Rothlander




    Wednesday, December 3, 2014 2:53 PM
  •  I was able to resolve this.  The form load event was setting the button to enabled, then other functions controlled the disabling.  But setting it to disabled in the form_load, the issue seems to have gone away.


    Jon Gregory Rothlander

    • Marked as answer by jonrothlander Wednesday, January 7, 2015 7:16 PM
    Wednesday, January 7, 2015 7:15 PM