title: GetGlobalContext is not defined in HTML webresrouce of Dynamics CRM
body: <p>I've an HTML web resource in Dynamics CRM on-premise environment. It is saved as <code>new_htmlpage1</code>, now at a click of Custom button I'm opening this <code>HTML</code> web resource. I've added <code>ClientGlobalContext.js.aspx</code> as reference in HTML webresource as well. But still I am receiving error that <code>GetGlobalContext is not defined</code></p>
  
  <p>Below is my HTML source code.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;script src="../ClientGlobalContext.js.aspx" type="text/javascript"&gt;&lt;/script&gt;
  
  &lt;script type="text/javascript"&gt;
  
  function tempContext(){
  
   if (typeof GetGlobalContext != "undefined") {
  
              var userName = Xrm.Page.context.getUserName();
  
              alert(userName);
  
              return;
  
          }
  
  }
  &lt;/script&gt;
  &lt;/head&gt;
  &lt;body onload="tempContext()"&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is the walkthrough from Microsoft that I am following, but still unable to get GlobalContext. </p>
  
  <p>Please let me know what I am missing here.</p>