title: Opening an order in CRM 2013 sometimes gives a blank page
body: <p>Sometimes CRM 2013 decides to give me the following error when opening an Order (and presents me with an empty page, but with the top navigation bar intact):</p>
  
  <pre><code>&lt;CrmScriptErrorReport&gt;
  &lt;ReportVersion&gt;1.0&lt;/ReportVersion&gt;
  &lt;ScriptErrorDetails&gt;
  &lt;Message&gt;Unable to get property 'ClientVariables' of undefined or null reference&lt;/Message&gt;
  &lt;Line&gt;2&lt;/Line&gt;
  &lt;URL&gt;/_common/JsProvider.ashx?ids=1959345455-451858892-1713948411-1279630416-1250882489-367493978-19173614-574022791-696891199-2007586035-1552783829&amp;ver=-976933632&lt;/URL&gt;
  &lt;PageURL&gt;/main.aspx?etc=1088&amp;extraqs=%3f_gridType%3d1088%26etc%3d1088%26id%3d%257b76EB6220-FB46-E311-93F3-00155D5752A9%257d%26rskey%3d674031362&amp;pagemode=iframe&amp;pagetype=entityrecord&amp;rskey=674031362    &lt;/PageURL&gt;
     &lt;Function&gt;anonymous(){returnthis.get_$L_0().ClientVariables}&lt;/Function&gt;
     &lt;CallStack&gt;
      &lt;Function&gt;anonymous(){returnthis.get_$L_0().ClientVariables}&lt;/Function&gt;
     &lt;/CallStack&gt;
    &lt;/ScriptErrorDetails&gt;
    &lt;ClientInformation&gt;
     &lt;BrowserUserAgent&gt;Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0; .NET4.0E; .NET4.0C)&lt;/BrowserUserAgent&gt;
     &lt;BrowserLanguage&gt;en-US&lt;/BrowserLanguage&gt;
     &lt;SystemLanguage&gt;en-US&lt;/SystemLanguage&gt;
     &lt;UserLanguage&gt;en-US&lt;/UserLanguage&gt;
     &lt;ScreenResolution&gt;1920x1080&lt;/ScreenResolution&gt;
     &lt;ClientName&gt;Web&lt;/ClientName&gt;
     &lt;ClientTime&gt;2013-11-11T17:32:05&lt;/ClientTime&gt;
    &lt;/ClientInformation&gt;
    &lt;ServerInformation&gt;
      &lt;OrgLanguage&gt;1033&lt;/OrgLanguage&gt;
      &lt;OrgCulture&gt;1043&lt;/OrgCulture&gt;
      &lt;UserLanguage&gt;1033&lt;/UserLanguage&gt;
      &lt;UserCulture&gt;1043&lt;/UserCulture&gt;
      &lt;OrgID&gt;{54131DE3-6D18-44FD-B4D0-0A9E87DA3E9D}&lt;/OrgID&gt;
      &lt;UserID&gt;{E369A31E-3446-E311-93F2-00155D5752A9}&lt;/UserID&gt;
      &lt;CRMVersion&gt;6.0.0.809&lt;/CRMVersion&gt;
    &lt;/ServerInformation&gt;
  &lt;/CrmScriptErrorReport&gt;
  </code></pre>
  
  <p>This will keep on happening until I fiddle around with the cache or open another organisation. I'm still not sure what exactly resolves it. I do have custom code on the Order form but I often go days without getting the error. Any idea how I can try to locate the cause of this error and whether it has something to do with my custom code or whether its a bug in CRM 2013?</p>
  
  <p>Thanks.</p>