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.

🙂

Leave a Reply

Visitors

2,229,536 hits

Top Posts

Discover more from Rajeev Pentyala – Technical Blog on Power Platform, Azure and AI

Subscribe now to keep reading and get access to the full archive.

Continue reading