- Back to Home »
- At Last!! Hide Tab (Section) in CRM 2011 with Javascript!!!
Posted by : XRM Consultant
Sunday, 4 September 2011
Hi!
Ok, i realise that , for everyone else, this is not an earth shattering piece of JavaScript but this has been bugging me for Aaaaaaaaaaages!!!
I have been looking for the JavaScript to hide Tab (or what is now known as a section) in CRM 2011. Every other blog/SDK/forum post i read suggested the following:
1: Xrm.Page.ui.tabs.get(5).SetVisible(false);
2: Xrm.Page.ui.tabs.get(5).SetVisible(true);
No matter how i tried i could not get this to work. However, after some detective work……and reading this blog post (cheers) i realised that the bit i was missing was that in the script, the brackets need to contain the name of the tab (name, not the Label). However, it has to be contained in “”. So my code was…
1: Xrm.Page.ui.tabs.get("tab_3").SetVisible(false);
2: Xrm.Page.ui.tabs.get("tab_3").SetVisible(true);
Sorted! Hope that helps
Cheers
xRM Consultant
Xrm.Page.ui.tabs.get(5).SetVisible(false); doesn’t work
ReplyDeleteXrm.Page.ui.tabs.get(5).setVisible(false); it’s working
write setVisible , no SetVisible. no capital S :-)
ReplyDeletehow to change the background color of a tab / section
ReplyDelete