Notifications
Announcements
No record found.
Is this possible? If not, how can I best achive this? I require a tab to be hidden when a particular option set value is selected...
*This post is locked for comments
I'm not sure about business rules, But with Javascript it should be stright forward...
<<TAB>>.setVisible(true/false) should do the trick directly.
Please refer msdn.microsoft.com/.../gg328067.aspx for further more details.
Happy coding..
-Srikanth
Dear MDS,
If you hide all of the fields in a tab by business rules, it will hide the tab as well.
Regards,
Abed.
Thanks. The tab I want to hide only contains a chart from a related entity, so I'm unable to choose it in the "hide field" element of the business rule....
In your cases you can hide it only by using java script, please take a look to : msdn.microsoft.com/.../gg328067.aspx
and
community.dynamics.com/.../117395.aspx
MDS,
In your case you need javascript, can't use Business Rule.
Thanks.
You can simply use
Xrm.Page.ui.tabs.get("TABName").setVisible(true); //to show
Xrm.Page.ui.tabs.get("TABName").setVisible(false); //to hide
Thanks all. My javascript is bit/lot rusty.
I have a option set - IsSchool - that should dictate whether tab_6 is visible or not. If IsSchool value equals Yes, then tab_6 should be hidden and vice versa.
Here is my code (that's not working)....
function IsSchool()
{
var IsSchool = XRM.Page.getAttribute("new_IsSchool").getValue();
if (IsSchool == True)
Xrm.Page.ui.tabs.get("tab_6").setVisible(false);
}
I need the tab behaviour to change when the option set is selected, so I presume it needs to be OnChange....
Is IsSchool field tow option or option set?
If its an option set type then you must get the value of item "YES" from IsSchool field properties screen, then make a condition on the value not on "true" or "false".
It's a two option set (basic yes/no).
I've changed as below:
function IsSchoolPartner()
{ var IsSchool = XRM.Page.getAttribute("new_IsSchool").getValue();
if (IsSchool == Yes)
Xrm.Page.ui.tabs.get("tab_6").setVisible(false); }
The error I'm getting when changing the IsSchool option is "XRM is undefined"
Any help greatly appreciated..
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 Neeraj Kumar as our Community Spotlight honoree for…
These are the community rock stars!
Stay up to date on forum activity by subscribing.
SA-08121319-0 4
Calum MacFarlane 4
Alex Fun Wei Jie 2