Quantcast
Channel: CRM Development forum
Viewing all articles
Browse latest Browse all 8223

CRM 2011 JavaScript assistance needed.

$
0
0

I have been working on the following javascript for awhile now and keep getting error that function is undefined. I can not see where my code is incorrect. Any assistance would be greatly appreciated. I am trying to show/hide a field and set the requirement leve based on the value in an option set.

function onClientReportingReportTypeChange() {
    var reportType = Xrm.Page.getAttribute("new_reporttype").getText();
	if (reportType == "Standard") {
        Xrm.Page.getAttribute("nhs_reportname").setRequiredLevel("none")
	Xrm.Page.getAttribute("nhs_reportname").setVisible(false)
        } 
	else if (reportType == "Custom") {
        Xrm.Page.getAttribute("nhs_reportname").setRequiredLevel("required")
	Xrm.Page.getAttribute("nhs_reportname").setVisible(true)
        }
}


Viewing all articles
Browse latest Browse all 8223

Trending Articles



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