title: The account of the contact on the order Microsoft CRM 4.0
body: <p>When I create an order from a contact I want the account of the contact on the regarding field and not the contact. Because of that I created a code in the onload event which works very well.</p>
  
  <pre><code>if (
  (window.opener != null) &amp;&amp; 
  (window.opener.parent != null) &amp;&amp; 
  (window.opener.parent.document != null) &amp;&amp; 
  (window.opener.parent.document.crmForm != null)) {
  
      var parentForm = window.opener.parent.document.crmForm;
      if (parentForm.ObjectTypeName == "contact")
      {
          if (parentForm.parentcustomerid.DataValue != null)
          { 
  
              var newIdArray;
              newIdArray = parentForm.parentcustomerid.DataValue;
              crmForm.all.customerid.DataValue = newIdArray;
              //crmForm.all.from.DataValue = newIdArray;
          }
      }
  }
  </code></pre>
  
  <p>The problem appears when I have created a quote and try to convert it to an order. The following warningerror appears. (I have done my best to translate it from Norwegian)</p>
  
  <p>"It appeard an error with the customized event for this field.
  <br>Field: Window
  <br>Event: Onload
  <br>Error: The server (not the serverprogram) is not available and is gone. The connections is not guilty. The event has not been made."</p>
  
  <p>After that you click ok and it works ok. Does anyone know why this warningmessage appear?</p>
  
  <p>Thanks, Martin</p>