0 down vote favorite
recently I've faced with strange behavior of Xrm.Page.ui.tabs.get("bla-bla").setVisible(false) On custom form I have a couple of tabs (one of them contains subgrid) hidden by default and depending on some conditions I need to show some of them. I do it by following JS in form.onLoad:
function onLoadInvoiceLineForm(){
var parameters = {};
parameters = Xrm.Page.context.getQueryStringParameters();
type = parameters["p_CForm"];
Xrm.Page.ui.tabs.get("gff").setVisible(type=="ff");
Xrm.Page.ui.tabs.get("sff").setVisible(type=="ff");
Xrm.Page.ui.tabs.get("ctc").setVisible(type=="ctc");
}
here I have a problem with tab "gff" which is the "General" tab on the form - it cannot be hidden by setVisible(false). I've recreated this tab again and again, sorted fields in all of the available tabs on the form, renamed this tab, but without any luck - it is still shown.
Any other tab can be shown/hidden with setVisible(), except "General".
Probably, some of you have met with this and know the fix? Please, help.
thanks,
Gennadii