Thursday, November 24, 2011

hide show tab, section, field on ms crm 2011

some times we need to hide/show ms crm 2011 tabs, sections or fields

hide/Show a tab
var tabs = Xrm.Page.ui.tabs.get();
tabs[n].setVisible(boolean);
where n  is the index value of the tab, starts from 0
 and boolean is true or false

hide/show a section
var sections = Xrm.Page.ui.tabs.get(n).sections.get();
sections[m].setVisible(boolean);
where n  is the index value of the tab, starts from 0
m  is the index value of the section in the tab, starts from 0
 and boolean is true or false

hide/show a Field(attribute)
Xrm.Page.ui.controls.get(
where boolean is true or false.

thanks
yes.sudhanshu
"<attributeName>").setVisible(boolean);

No comments:

Post a Comment