Tip #28: Beware of autosave in your scripts

CRM 2013 introduced autosave feature that, depending on a specific scenario, could be really helpful. There is also ability to switch autosave off across the organization using Administrator > System Settings dialog. Unfortunately, this flag only controls form behavior when user explicitly edits the record. The record will still be saved if user navigates away using, for example, browser’s back button. In this case, if your form has onload script that modifies the content, the changes applied by the script will be saved whether user intended it or not. This could be completely unexpected and needs to be handled with caution. It is possible to better manage autosave behavior but it does involve a bit more than a simple checkbox. Hopefully, future CRM updates will add some granularity to the autosave settings so that it can be truly switched off, when needed, without any side-effects.

Leave a Reply

Your email address will not be published. Required fields are marked *