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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Show/Hide Tab depending from Field Value possible?

(1) ShareShare
ReportReport
Posted on by

Hi,

is it possible to hide/show a tab if a field has a certain value? It would be great reach this Goal without using code.

Regards, Jan 

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Community Member Profile Picture
    on at

    Hi Jan,

    No, hiding tabs based on field value is not possible without code, you can do it with simple javascript though; like discussed here: community.dynamics.com/.../156616

    Hope this helps,

    Kind regards,

    Robin

  • Verified answer
    nghieppham Profile Picture
    4,755 on at

    Hi Jan,

    It is not possible to do that without code. If you want to hide/show the field the crm form, MS CRM has been support business rule to do that.

    About tab , you just write js web resource and call it at Onload event or Field change. And then you just get your certain value and compare to show/hide controls of form by this Xrm.Page.ui.tabs.get("yourtabname").setVisible(false) (tab control) and Xrm.Page.ui.tabs.get("yourtabname").sections.get("Your_session_name").setVisible(false). 

  • Saddamk206 Profile Picture
    777 on at

    it is not possible by Business Rules. You can use javascript for hide and show

     

     

    //Hide the tab

    Xrm.Page.ui.tabs.get("TabName").setVisible(false);

    //Show the tab

    Xrm.Page.ui.tabs.get("TabName").setVisible(true);

  • Suggested answer
    Venkatesh Ekkaluri Profile Picture
    150 on at

    Hi Jan,

    Without Java Script you will not be able to hide/show Tabs. Please find the code snipet below

    function hideOrShowSubgrids() {
     
        var taskTab = Xrm.Page.ui.tabs.get('tab_11');
    //Time out function to wait untill the component loads.     if (taskTab == null || taskTab == "undefined") {         setTimeout(function () { hideOrShowSubgrids(); }, 1000);         return;     }

    //Set the tab as visible if the Case Category is "Main Task".     if (caseCategory == "Main Task") {         Xrm.Page.ui.tabs.get('tab_11').setVisible(true);     } }
  • Community Member Profile Picture
    on at

    Does this code support mobile? If not, does anyone know of code that will show/hide tabs based off a field value in mobile? (onload is fine)

    Thanks!

  • Saddamk206 Profile Picture
    777 on at

    SASolution Are you using a Mobile browser or Dynamic 365 App???

    if you are using a mobile browser then sometimes javascript doesn't work.

    and if you are using Dynamic 365 App then it will not display tab.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
AS-17030037-0 Profile Picture

AS-17030037-0 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans