refreshRibbon does not take effect

0
43
Forum Post: Change the Filter On option on Opportunity Associated View for Account form


On a RibbonButton I have an EnableRule. The enableRule has a CustomRule where i call a js-Function. This js-function only checks attributes like this:

var checkAttributes=function() {
return attr1 && attr2;
}

So show the button if both attributes are true (or exists),

On my form I have an twoOptionField. If changed to ‘no’, set attr1 to true (attr2 is set true/false in formLoad – in my case it’s always true) and then call 

Xrm.Page.ui.refreshRibbon();

But nothing happens. Breakpoint in function ‘checkAttribute’ but debugger doesn’t break!

But (strange thing): I resize window and… ta-da…. checkAttribute is called and Buttons are visible

What the hell??

Has anybody a hint for me, why this strange thing happens?

thx in advance
©a-x-i



Source link

Leave a reply

Please enter your comment!
Please enter your name here