function tryRun() {
if (!parent.relationships) {
setTimeout(tryRun, 100);
return;
}
if (parent.relationships.document.readyState != "complete" || !parent.relationships.currTabID) {
setTimeout(tryRun, 100);
}
else {
var tabbar = parent.relationships.relTabbar;
if (document.thisItem.getProperty("classification", "") == "Equipment") {
//
//for attachement
tabbar.SetTabVisible('810DEFB14CD44050B599296ADCD99124', 1);
//for maintainence plan
// var tabbar2 = parent.relationships.relTabbar;
tabbar.SetTabVisible('1B836691ECF84263B885EE4CA8427525', 1);
//for MSA
tabbar.SetTabVisible('94961F7052D440EB95F0769CD098486A', true);
parent.relationships.relTabbar.removeTabByLabel("AML");
parent.relationships.relTabbar.removeTabByLabel("CAD File");
parent.relationships.relTabbar.removeTabByLabel("Documents");
parent.relationships.relTabbar.removeTabByLabel("BOM/Item");
parent.relationships.relTabbar.removeTabByLabel("MSA");
}
else if (document.thisItem.getProperty("classification", "") == "Tool") {
parent.relationships.relTabbar.removeTabByLabel("AML");
parent.relationships.relTabbar.removeTabByLabel("Attachments");
parent.relationships.relTabbar.removeTabByLabel("Documents");
parent.relationships.relTabbar.removeTabByLabel("Maintainence Plans");
parent.relationships.relTabbar.removeTabByLabel("Tool");
}
else {
//tabbar = parent.relationships.relTabbar;
tabID = tabbar.GetTabId("Maintainence Plans");
tabID1 = tabbar.GetTabId("Attachments");
tabID2 = tabbar.GetTabId("MSA");
if (tabID) {
tabbar.SetTabVisible(tabID, false);
}
if (tabID1) {
tabbar.SetTabVisible(tabID1, false);
}
if (tabID2) {
tabbar.SetTabVisible(tabID2, false);
}
// parent.relationships.relTabbar.removeTabByLabel("Maintainence Plans");
}
}
}
setTimeout(tryRun, 100);
in equipment condition it only able to reshow attachment tab not maintenance plan tab