"тнιѕ вℓσg ¢συℓ∂ ѕανє уσυя мσηєу ιƒ тιмє = мσηєу" - ∂.мαηנαℓу

Wednesday, 30 March 2011

How to Hide / Show a Section in CRM 2011 using Javascript OR Toggle visibility of section in CRM 2011

Code snippet to hide or show a section on the entity form in CRM 2011

To show a section :

Xrm.Page.ui.tabs.get("yourtabname").sections.get("your section name").setVisible(true);


To hide a section:

Xrm.Page.ui.tabs.get("yourtabname").sections.get("your section name").setVisible(false);

2 comments:

  1. I am trying to hide a section. I put the display name of the Tab the section is in and the display name of the section and it did not work. Where do I find the correct name to put in?

    ReplyDelete
  2. Hello Again Michael,
    Firstly we need to put the focus on the right Tab or section and then double click on it to find out the properties window. And then you could see the right Name. Please make sure that you got the right properties window. Sometimes CRM might loose focus and then it it will point to some other properties window. So if its a section the title of the properties window would be Section Properties. This is the key.

    ReplyDelete