title: Getting a record's guid before save operation
body: <p>I need to use the GUID of a record. If the record is old, i can access to the guid with</p>
  
  <pre><code>Xrm.Page.data.entity.getId();
  </code></pre>
  
  <p>The issue is that I need to use the ID in the same moment that a new record is saved.</p>
  
  <p>I try to save the record, reload the page and then use the id with</p>
  
  <pre><code>parent.Xrm.Page.data.entity.save();
  window.location.reload(true);
  var currentCaseId = Xrm.Page.data.entity.getId();
  </code></pre>
  
  <p>but it does not work.</p>
  
  <p>Edit: I change my code so now I can get the ID in the onLoad event but now my problem is that I can only get the GUID if the user select "Save" (cause "save" button refresh the page). If the user select "Save&amp;Close" or "Save&amp;New" the record doesn't refresh so the onLoad event doesn't happen and I can't get the GUID.</p>