Posted by : XRM Consultant Sunday, 4 September 2011


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


xRM Consultant

{ 4 comments... read them below or Comment }

  1. Xrm.Page.ui.tabs.get(5).SetVisible(false); doesn’t work

    Xrm.Page.ui.tabs.get(5).setVisible(false); it’s working

  2. write setVisible , no SetVisible. no capital S :-)

  3. how to change the background color of a tab / section


Search This Blog

Popular Post

About xRM

Having worked with Microsoft Dynamics CRM 4.0 in a sales & development environment, my focus now is on customising this awesome solution and showing its true potential.
Powered by Blogger.

- Copyright © xRM Consultant -Metrominimalist- Powered by Blogger - Designed by Johanes Djogan -