Advertisements
Home > CRM 2011, JScript > Hide/Show sections using JScript in CRM 2011

Hide/Show sections using JScript in CRM 2011

Hi,

We can’t directly hide or show the section using

  • Xrm.Page.ui.controls.get(“{section_name}”).setVisible(true/false)

You have to first get the “Tab” control of your “Section”.

Below is the script to Hide/Show sections

    // Get the Tab which contains your Section

var tabCtrl = Xrm.Page.ui.tabs.get(“{tab_name}”);

if (tabCtrl && tabCtrl.sections.get(“{section_name}”)) {

tabCtrl.sections.get(“{section_name}”).setVisible(true/false);

}

You can get the name of Tab or Section from customization form.

🙂

Advertisements
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: