Skip to content

Instantly share code, notes, and snippets.

@DynCon365
Last active April 24, 2018 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DynCon365/8faaf8705fd709d7da2de86da7e1ed3f to your computer and use it in GitHub Desktop.
Save DynCon365/8faaf8705fd709d7da2de86da7e1ed3f to your computer and use it in GitHub Desktop.
Dynamics 365/CRM | Show/hide form sections
// Consider using Business Rules before using this code
// Create variables for the tab an section
var tab=Xrm.Page.ui.tabs.get("TabName");
var section = tab.sections.get("SectionName");
// Hide a section
section.setVisible(false);
// Show a section
section.setVisible(true);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment