In this webinar, our experts showcase a variety of demo use cases of how different components of the...
Out of box, the main forms for the entities in Microsoft Dynamics 365 listed below will have auto-save enabled by default. This means, any changes made to a form will be saved automatically after thirty seconds. In this blog, we show you when and how to disable the auto-save feature.
Account | Appointment | Campaign | |
Campaign Activity | Campaign Response | Case | |
Competitor | Contact | Contract | |
Contract Line | Fax | ||
Invoice | Invoice Product | Lead | |
Letter | Marketing List | Opportunity | |
Opportunity Product | Order | Order Product | |
Phone Call | Price List Item | Product | |
Quick Campaign | Quote | Quote Product | |
Recurring Appointment | Sales Literature | Team | |
Task | User |
Dynamics 365 gives the option to turn off auto-save. While most people may prefer the auto-save turned on, some organizations may have customizations that were designed expecting an explicit save.
If your organization has plug-ins, workflows, or jscripts that run on the OnSave event, they will run each time auto-save occurs. This may potentially cause undesirable results especially if these customizations were not designed to work with auto-save.
If auditing is enabled for an entity, each auto-save is considered a separate update. If your organization has metrics driven on audit history and treat each save as a "touch" of a record, you will see a high frequency of touches thus making an unreliable metric.
If auto-save will cause problems with any extensions or metrics you are using, you can consider disabling it for your organization.
The field that a user is currently editing will not be included in an auto-save.
Since the form reloads after each auto-save, if another user updated the same record while you are editing it, those changes will be retrieved and displayed in the form when auto-save occurs.
With auto-save enabled, the SAVE button in the command bar is not shown after the record is created. You can still see the SAVE button in the lower right corner that will enable if there are any unsaved changes.
When auto-save is enabled, the record will be saved whenever you navigate away from the record or close the window displaying a record. There is no need for the explicit save using the Save & Close button.
There is no setting to disable auto-save for individual entities or forms.
If you wish to disable auto-save for specific entity forms, you can do this by adding code to the OnSave event in the entity form.
1. Create a JavaScript web resource and add it to the form
function preventAutoSave(econtext) {
var eventArgs = econtext.getEventArgs();
if (eventArgs.getSaveMode() == 70 ||
eventArgs.getSaveMode() == 2) {
eventArgs.preventDefault();
}
}
2. Configure the OnSave event
Auto-save will now be disabled for the form, but data can still be saved by clicking the Auto save button in the lower-right corner. If users attempt to navigate away from a form or close a form where data has been changed, they will get a prompt to save their changes before they can navigate away or close the form.
For more Dynamics 365 tips and tricks, subscribe to our blog!
Happy Dynamics 365'ing!