web
You’re offline. This is a read only version of the page.
close
Skip to main content
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
    RE: Show/Hide Tab depending from Field Value possible?

    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
    RE: Show/Hide Tab depending from Field Value possible?

    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
    RE: Show/Hide Tab depending from Field Value possible?

    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
    RE: Show/Hide Tab depending from Field Value possible?

    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
    RE: Show/Hide Tab depending from Field Value possible?

    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
    RE: Show/Hide Tab depending from Field Value possible?

    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

Responsible AI policies

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

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
HR-09070029-0 Profile Picture

HR-09070029-0 2

#1
UllrSki Profile Picture

UllrSki 2

#3
ED-30091530-0 Profile Picture

ED-30091530-0 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans