title: Dynamics 2011 QueryString Wrong
body: <p>I have some JavaScript registered to the OnLoad event of the Appointment edit page in Dynamics 2011. </p>
  
  <p>I have another page that launches a popup with the following url:</p>
  
  <pre><code>http://dynamicsserver/main.aspx?etn=appointment&amp;extraqs=etc%3d4201&amp; 
  pagetype=entityrecord#myextraparameter=1
  </code></pre>
  
  <p>Note the myextraparameter=1 at the end. I need to get that parameter value in my OnLoad JavaScript....but the window.location in my JavaScript returns the following:</p>
  
  <pre><code>http://dynamicsserver/OrgName/userdefined/edit.aspx?etc=4201&amp;pagemode=iframe&amp;sitemappath=Workplace%7cMyWork%7ccnav_dashboards#
  </code></pre>
  
  <p>instead of the actual URL I need. What's more interesting is that at the top of the popup window, in the address bar, the URL is reflected correctly as</p>
  
  <pre><code>http://dynamicsserver/main.aspx?etn=appointment&amp;extraqs=etc%3d4201&amp; 
  pagetype=entityrecord#myextraparameter=1
  </code></pre>
  
  <p><code>Xrm.Page.context.getQueryStringParameters()</code> returns the same useless URL's parameters, not the one I need.</p>
  
  <p>How can I get my parameter?</p>