title: get guid id from Microsoft CRM - javascript console
body: <p>Apparently in earlier versions of Microsoft CRM it was possible to get record Guid in detail page of a record (eg: Account, Contact) using Javascript console, using synatax such as </p>
  
  <p>Xrm.Page.data.entity.getId();
  frames[0].Xrm.Page.data.entity.getId();</p>
  
  <p>ref: <a href="https://crmbusiness.wordpress.com/2014/02/17/crm-2013-javascript-to-get-id-of-record/" rel="nofollow noreferrer">https://crmbusiness.wordpress.com/2014/02/17/crm-2013-javascript-to-get-id-of-record/</a></p>
  
  <p>I am unable to repeat this in CRM 2015.</p>
  
  <pre><code>&gt; frames[0].Xrm.Page.data.entity.getId();
  Unable to get property 'entity' of undefined or null reference
  
  
  &gt; Xrm.Page.data.entity.getId();
  Unable to get property 'entity' of undefined or null reference
  </code></pre>
  
  <p>however:</p>
  
  <pre><code>&gt; this
  </code></pre>
  
  <p>gives me dump that includes </p>
  
  <p>USER_GUID: "{98D61030-7513-4EAA-A243-1D29FA99E0A0}",</p>
  
  <p><strong>Screen shot of IE Console</strong></p>
  
  <p><a href="https://i.stack.imgur.com/OWDPt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OWDPt.png" alt="enter image description here"></a></p>