title: getControl.setDefaultView in crm 2011 causes an error
body: <p>I used</p>
  
  <pre class="lang-js prettyprint-override"><code>document.getElementById("customerid").setAttribute("defaulttype", "2");
  document.getElementById("customerid").setAttribute("lookuptype", "2");
  Xrm.Page.getControl("customerid").setDefaultView("{A9AF0AB8-xxxx-xxxx-xxxx-C6281FED7FAB}");
  </code></pre>
  
  <p>in <code>Form_onchange()</code>, and it gives me this error:</p>
  
  <blockquote>
    <p>Object doesn't support this property or method".</p>
  </blockquote>
  
  <p>If I close the popup window, the program actually works fine.</p>
  
  <p>What might be the problem?</p>
  
  <p>P.S. I'm running IE9 and the error message didn't specify which method is not supported.</p>