Wednesday, May 21, 2008

Hiding CRM form fields and tabs

If you're looking for Display a hidden field or tab - Direct Here.
These apply to Microsoft Dynamics CRM 4.0. Note - These are unsupported customizations and may not work on CRM Upgrades.

Avoiding Scenarios where you can apply this functionality, I am just getting down to it. Depending on your requirement you may want to do one of these.

Let me take one at a time:

Hiding CRM form field:
Suppose that field's schema name is "new_field".

This is used to hide the textbox
crmForm.all.new_field_d.style.display = "none";

Use this to hide the Label
crmForm.all.new_field_c.style.display = "none";
Note '_d' and '_c', they are important.

Hiding CRM tabs:
The General tab is common to all and you may never want to hide this tab. The custom tab(s), the one right next to the general tab takes the value "tab1Tab", next to this on the right takes the value "tab2Tab" and so on.

Apply this nugget to hide the 1st tab next to the general tab.
crmForm.all.tab1Tab.style.display = "none";

This is about hiding them, just in case you want to seek them.