Hello- I created the following script in CRM 2011 to change the required level of a field. It is not working. Can anyone assisst me with why thi sis not working? What am I missing? function Form_OnSave() { } function Form_OnLoad() { function setrequire() } function setrequire() var type = Xrm.Page.getAttribute("cprs_type").getSelectedOption().text; if (type == "Option5") { then Xrm.Page.getAttribute("cpdc_primarypracticearea").setRequiredLevel("none"); } else { Xrm.Page.getAttribute("cpdc_primarypracticearea").setRequiredLevel("required"); } }
↧