title: Check the form has saved or not in CRM 2011 Javascript
body: <p>I'm writing a Javascript to call external link on click of custom ribbon button in CRM 2011 entity form. In javascript I'm checking the form is dirty or not. If the form is dirty,(means some fields are modified by user) then JScript will save the form forcefully using <b>Xrm.Page.data.entity.save()</b>. But, when the mandatory fields have not filled, force save will not be happened and I have to show some custom message to fill those fields, terminate the flow of control and should not open the external link. How to get whether the form has saved or not..?</p>
  
  <p>Piece of code as below:</p>
  
  <pre><code>function buttonOnClick() {
      if (Xrm.Page.data.entity.getIsDirty()) 
      {
          Xrm.Page.data.entity.save();
      }
      else 
      {
          window.open('http://www.google.com', 'name', 'width=900,height=800');
      }
  }
  </code></pre>