Let me say up front....I am unfamiliar with arrays and do not know/understand the concept and how to define or create them.
I have a "partners" type field from a custom activity that I am attempting to hide based on a Mandated (value "0") or Non-mandated (value "1") option set field. Using the following code in on-load and on-change web-resource, I keep getting the error message "Value is not an array". Can someone please help.
function HideMandate_Lookup() {
var mandated = Xrm.Page.getAttribute("statemandated").getValue();
if (mandated != 0) {
Xrm.Page.ui.controls.get("partners").setVisible(false)
Xrm.Page.getAttribute("partners").setValue(false);
}
else if (mandated == 0) {
Xrm.Page.ui.controls.get("partners").setVisible(true)
Xrm.Page.getAttribute("partners").setValue(true);
}
}