Quantcast
Channel: Microsoft Dynamics CRM Forum - Recent Threads
Viewing all articles
Browse latest Browse all 46379

Show tab based on OptionSet field

$
0
0

Hello,

I have a requirement that by default, i set the tab properties to visibility(false) i.e.,hidden . Then,after selecing a value in option set field, i want all the tabs to be visible and i am using this code- :

function customerProfileScoreVisibility()
{
var optionset = Xrm.Page.getAttribute("new_contacttype");
if (optionset != null) {
var text = optionset.getText();
var value = optionset.getValue();
if(text == "Customer")
{
Xrm.Page.ui.tabs.get("SUMMARY_TAB").setVisible(true);
Xrm.Page.ui.tabs.get("SUMMARY_TAB").sections.get("CUSTOMER_DETAILS_TAB").setVisible(true);
Xrm.Page.ui.tabs.get("Transactions").sections.get("tab_4_section_1").setVisible(true);
Xrm.Page.ui.tabs.get("Transactions").setVisible(true);
Xrm.Page.ui.tabs.get("DETAILS_TAB").setVisible(true);
Xrm.Page.ui.tabs.get("Health Behaviours").sections.get("sectioname").setVisible(true);
}
}
}

 But not showing the tabs..Any help?

Thanks and Regards

CRM Beginner


Viewing all articles
Browse latest Browse all 46379

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>