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.
🙂
Comments (0)
Trackbacks (0)
Leave a comment
Trackback
Stats
- 1,782,141 hits
Join 431 other subscribers
Top Posts
- [Step by Step] Dataverse | Connect Cloud flow with Service Principal (Application User)
- [Step by Step] Power Apps | Using 'Tabs or tab list' modern control
- Set “Created On”,” Created By”, “Modified On”, “Modified By” fields using SDK/Data Import/Plug-in – Dynamics 365
- [Quick Tip] Power Automate flow | Get current Environment ID
- Power Automate | Dataverse | Create row by setting lookup column with 'Key'
- Power Apps component framework (PCF) - Beginner guide
- Power Platform CLI | Pack and Unpack solution using map xml
- [Step by Step] Dataverse | Plugins | Using Dependent Assemblies
- [Code Snippet] Custom Workflow Activity with Input and Output Params
- [Step by Step] Model-driven apps | In-app notifications