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

Hide / Show tab JavaScript

$
0
0

Hi,

I've developed some JavaScript to show a tab if the 'parent worksheet' Field does not contain data. Else show the tab. I must have made a mistake because I keep getting Script errors. Any help would be appreciated.:

function hideComponent()

var parentWorksheet = Xrm.Page.getAttribute("new_parentworksheet").getValue();
if(parentWorksheet == null)
{
Xrm.Page.ui.tabs.get("tab_11").setVisible(false);
}
else
{
Xrm.Page.ui.tabs.get("tab_11").setVisible(true);
}

I've set this to run onLoad of the Form, referencing the function as 'hideComponent'


Viewing all articles
Browse latest Browse all 46379

Trending Articles



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