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

Webresource - Value is not an array

$
0
0

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);
    
 }
      }

Viewing all articles
Browse latest Browse all 46379

Trending Articles



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