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

show/hide tab...

$
0
0

I am having an issue trying to hide and show a tab based on another fields value.

I have a field called, "Record Type" and this field is an option set.  When this field is equals "Medicare" I want the tab to appear and when it doesn't I want it to hide.  I currently have the checkbox "default visiable" on this tab unchecked.

function RecordTypeOnChange()
 {
 var RecordType = Xrm.Page.getAttribute("nhs_recordtype").getSelectedOption();
 
  if (RecordType == "Medicare")
  {
  Xrm.Page.ui.tabs.get("tab_grievances").setVisible(true);
  }
 else if (RecordType != "Medicare")
  {
  Xrm.Page.ui.tabs.get("tab_grievances").setVisible(false);
  }
 }

Any help is greatly appreciated, thank you.


Viewing all articles
Browse latest Browse all 79901

Trending Articles



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