title: Dynamics CRM: Xrm.Internal.openDialog() Cancel Button Callback
body: <p>I have got a custom Dialog (web ressource) which i open with window.open over a ribbon button.</p>
  
  <p>In this custom Dialog i open the crm lookupdialog with window.open. If the user clicks OK, i can set the Dialog window focused. </p>
  
  <p>I want to focus the dialog window, when the user clicks Cancel.
  Can anyone help me please?</p>
  
  <pre><code>DialogOption.width = 500; DialogOption.height = 600;
  var dialogWindow = this.crmWindow.Xrm.Internal.openDialog(lookupurl, DialogOption, null, null, (returnValue) =&gt; this.ngZone.run(() =&gt; {
      this.lookupId = returnValue.items[0].id;
      this.lookupText = returnValue.items[0].name;
      window.focus();
    }));
  </code></pre>