Hi
In my requirement we need to hide mutiple tabs when form loads,like when we click new to create record and when we again open the created record to update
these needs to be hided and after saving the record too. Depending upon the checkboxes only related tabs need to be show other tabs should always be hided.
How to achieve this. I am using below javascript
function enableOrDisableFields() {
var isCreateForm = (Xrm.Page.ui.getFormType() == 1);
var isUpdateForm = (Xrm.Page.ui.getFormType() == 2);
if (isCreateForm === true) {
Xrm.Page.ui.tabs.get("tab_TabGroupSelector").setVisible(false);
Xrm.Page.ui.tabs.get("tg0_Tab2").setVisible(false);
Xrm.Page.ui.tabs.get("tg0_Tab3").setVisible(false);
} else if (isUpdateForm === true) {
Xrm.Page.ui.tabs.get("tab_TabGroupSelector").setVisible(false);
Xrm.Page.ui.tabs.get("tg0_Tab2").setVisible(false);
Xrm.Page.ui.tabs.get("tg0_Tab3").setVisible(false);
// code to be executed if the current form is an Update Form
}
By using this script only tab_TabGroupSelector is hiding not the other tabs. One more issue is tab_TabGroupSelector shoulb be visible
when we check the field called ABC. tab_TabGroupSelector is visible when we check the field ABC while creating the form but once we save and reopen the record its hided even the field is checked.
*This post is locked for comments
I have the same question (0)