thanks, code is below, but i noticed that when placing "alert(Xrm.Page.getAttribute("subjectid").getValue());" at the begging of the code, the returned answer on the browser was [object Object] . this means the value of the subject is not returned to the procedure and that is why all conditions will be false.
function showhide()
{
// content upload case
if(Xrm.Page.getAttribute("subjectid").getValue() == "Content Upload")
{
Xrm.Page.ui.tabs.get("general").sections.get("Content Upload").setVisible(true); // Make sure you are providing correct sectionname , tab name
}
else
{
Xrm.Page.ui.tabs.get("general").sections.get("Document Review").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OD Configuration").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Quality Check").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OrderStation Installation").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("On-Boarding call").setVisible(false); // Make sure you are providing correct sectionname , tab name
}
// Document Review case
if(Xrm.Page.getAttribute("subjectid").getValue() == "Document Review")
{
Xrm.Page.ui.tabs.get("general").sections.get("Document Review").setVisible(true); // Make sure you are providing correct sectionname , tab name
}
else
{
Xrm.Page.ui.tabs.get("general").sections.get("Content Upload").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OD Configuration").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Quality Check").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OrderStation Installation").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("On-Boarding call").setVisible(false); // Make sure you are providing correct sectionname , tab name
}
// OD Configuration case
if(Xrm.Page.getAttribute("subjectid").getValue() == "OD Configuration")
{
Xrm.Page.ui.tabs.get("general").sections.get("OD Configuration").setVisible(true); // Make sure you are providing correct sectionname , tab name
}
else
{
Xrm.Page.ui.tabs.get("general").sections.get("Document Review").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Content Upload").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Quality Check").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OrderStation Installation").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("On-Boarding call").setVisible(false); // Make sure you are providing correct sectionname , tab name
}
// Quality Check
if(Xrm.Page.getAttribute("subjectid").getValue() == "Quality Check")
{
Xrm.Page.ui.tabs.get("general").sections.get("Quality Check").setVisible(true); // Make sure you are providing correct sectionname , tab name
}
else
{
Xrm.Page.ui.tabs.get("general").sections.get("Document Review").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Content Upload").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OD Configuration").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OrderStation Installation").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("On-Boarding call").setVisible(false); // Make sure you are providing correct sectionname , tab name
}
// Order Installation
if(Xrm.Page.getAttribute("subjectid").getValue() == "OrderStation Installation")
{
Xrm.Page.ui.tabs.get("general").sections.get("OrderStation Installation").setVisible(true); // Make sure you are providing correct sectionname , tab name
}
else
{
Xrm.Page.ui.tabs.get("general").sections.get("Document Review").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Content Upload").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OD Configuration").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Quality Check").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("On-Boarding call").setVisible(false); // Make sure you are providing correct sectionname , tab name
}
// OnBoarding
if(Xrm.Page.getAttribute("subjectid").getValue() == "On-Boarding call")
{
Xrm.Page.ui.tabs.get("general").sections.get("On-Boarding call").setVisible(true); // Make sure you are providing correct sectionname , tab name
}
else
{
Xrm.Page.ui.tabs.get("general").sections.get("Document Review").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Content Upload").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OD Configuration").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("Quality Check").setVisible(false); // Make sure you are providing correct sectionname , tab name
Xrm.Page.ui.tabs.get("general").sections.get("OrderStation Installation").setVisible(false); // Make sure you are providing correct sectionname , tab name
}
}