title: CRM 2015, how do I show/hide a Quick View Control using JavaScript?
body: <p>I have a Policy form based on a Policy entity, I want to show or hide a Quick View within that policy in a section. I got the name for the Quick View as "secCommercialClient" and "secPersonalClient", however I cannot seem to hide/show these quick views. I can do it for the field related to the quick views simply using the following code : </p>
  
  <pre><code>var personalClient = Xrm.Page.getControl("new_personalpolicyholderid");
  var commercialClient = Xrm.Page.getControl("new_commercialpolicyholderid");
  if(personalClient.getAttribute().getValue() == null)
  {
    personalClient.setVisible(true/false);
  }
  
  else if(commercialClient.getAttribute().getValue == null)
  {
    commercialClient.setVisisble(true/false); 
  }
  </code></pre>
  
  <p>I cannot seem to get the QuickView control to show or hide i get a error saying "<strong><em>Unable to get property 'getAttribute' of undefined or null reference</em></strong>".
  I double checked in my solution of the form that indeed the name value is secCommercialClient and secPersonalClient, I success at hiding the fields but not the actual Quick Views.</p>
  
  <p>Any ideas?, I am IE's debugger tool to test my scripts on the Policy form of my CRM solution.</p>
  
  <p>I have included the image of the name property of the Quick View, am I using an incorrect name or is there something wrong in my code? <img src="https://i.stack.imgur.com/XRUOo.png" alt="enter image description here"></p>