web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Hiding Sections on Page

(0) ShareShare
ReportReport
Posted on by 80

Hi,

I want to hide Sections in Microsoft Dynamics CRM 2015 depending on a field.

I looked at JavaScripts, where I can set a Section Visible, but then I want the Visibility to depend on a field which is a text field. When the field name changes, I want the visibility to kick in. 

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rajkumar Rajaraman Profile Picture
    on at

    Hi Bongani,

    Refer the following link:

    www.dynamicscrmpros.com/hiding-section-fields-microsoft-dynamics-crm-2013-using-business-rules

    Regards,

    R. Rajkumar

  • Community Member Profile Picture
    on at

    Best way to do this use business rules. No need to write codes.

    Mansoor

  • Abed Haniyah Profile Picture
    4,287 on at

    Dear Bongani,

    To show/hide a section, there are 2 ways:

    1-Using business rule : Hiding all the fields contained in a section automatically hides the section. This can be used especially when you have few fields in your section.

    CAUTION: When a business rule is defined, you should create the “else” business rule. That means a business rule which shows your fields when your condition is verified and a BR which hides them when your condition is not OK.

    2-Using Javascript: You can also show/hide a section using this JS code:

    Show a section

    Xrm.Page.ui.tabs.get(“tabname”).sections.get(“sectioname”).setVisible(true);

    Hide a section

    Xrm.Page.ui.tabs.get(“tabname”).sections.get(“sectioname”).setVisible(false);

    Then  call the function on Onchange event at the field that you want

  • Suggested answer
    Saddamk206 Profile Picture
    777 on at

    Hi can hide or show using Javascript

    //Hide

    Xrm.Page.ui.tabs.get(“TabName”).sections.get(“SectioName”).setVisible(false);

    //Show

    Xrm.Page.ui.tabs.get(“TabName”).sections.get(“SectioName”).setVisible(true);

  • Suggested answer
    Silent Serenity Profile Picture
    55 on at

    Hi Everyone,

    Just an update for V9.0, since "XRM" will be deprecated we should use the "formContext" instead.

    Here's a link that I found for the implementation on it:

    charlesosei.uk/.../dynamics-quick-v9-hide-show-section-in-js

    I tested it myself and it really works! Happy Coding =D

  • Suggested answer
    Vipin J Profile Picture
    1,603 on at

    I have created some Generic Method to Hide and Show Tab and Section

    Please refer here : https://vjcity.blogspot.com/2021/07/generic-method-to-hide-and-show-tab-and.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans