title: Unable to save changes made to entity when calling javascript function through custom ribbon button event
body: <p>I'm trying to create a simple function which, when ribbon button is pressed, sets entity attribute value to null.
  Now the problem I am facing is, that the changes I make to the entity are not saved, form reloads and returns previous value.</p>
  
  <p>To the button event I pass 'Task' activity attribute 'actualend'. 'Actual End' field is disabled by default.</p>
  
  <pre><code>ClearField: function (field) {
      if (Xrm.Page.getAttribute(field) == null) return;
  
      Xrm.Page.ui.controls.get(field).setDisabled(false);
      Xrm.Page.getAttribute(field).setSubmitMode("always");
      Xrm.Page.getAttribute(field).setValue(null);
  
      if (Xrm.Page.data.entity.getIsDirty()) {
          Xrm.Page.data.entity.save(); //also tried addOnSave(function)
      }
  }
  </code></pre>
  
  <p>Following debugger I was able to track that all changes are made correctly, except that on save() method they are 'discarded', then form reloads with previous value. This code works fine with CRM UR8 yet with CRM UR13 it does not.</p>
  
  <p>Am I missing something?</p>