Tuesday, May 12, 2009

Hide / Unhide CRM Form Tabs

Did you know that you could hide and display CRM form tabs. Of course most of you did. Let me give you an example. To hide the second tab on the account form, this is what you should be doing.

crmForm.all.account.tab1Tab.style.display = "none";

My intend is not to convey how to hide a tab [I just did ;)] but also why "tab1Tab"?
I suggest you to have a look at the HTML source on the Account form IE8 > Page > View Source, You'll notice that the tabs have an ID on them (which go tab0Tab, tab1Tab, tab2Tab,........). We just refer them and then use JavaScript's CSS properties to achieve the result.

Caution: Something to keep in mind is if Microsoft decides to change the tab IDs in future releases, you're done! So make sure you have documented these customizations to easily accept future changes.

No comments:

Post a Comment