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
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
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).
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); } }
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!
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.
As AI tools become more common, we’re introducing a Responsible AI Use…
We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
HR-09070029-0 2
UllrSki 2
ED-30091530-0 1