AXForum  
Вернуться   AXForum > Microsoft Dynamics CRM > Dynamics CRM: Blogs
All
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск Все разделы прочитаны

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 29.08.2018, 00:20   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
powerobjects: Managing Auto-Save in Dynamics 365
Источник: https://www.powerobjects.com/2018/08...-dynamics-365/
==============


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.

AccountAppointmentCampaignCampaign ActivityCampaign ResponseCaseCompetitorContactContractContract LineEmailFaxInvoiceInvoice ProductLeadLetterMarketing ListOpportunityOpportunity ProductOrderOrder ProductPhone CallPrice List ItemProductQuick CampaignQuoteQuote ProductRecurring AppointmentSales LiteratureTeamTaskUser
When would you disable auto-save?

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.

Things to keep in mind

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.

How to disable auto-save for the organization

There is no setting to disable auto-save for individual entities or forms.
  1. Go to Settings > Administration.
  2. Choose System Settings.
  3. For the Enable auto-save for all forms option, select No.
How to disable auto-save for a form

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
  • Enter the following information in the web resource form:
    • Name: preventAutoSave
    • Display Name: Prevent Auto Save
    • Type: Script (JScript)
  • Next to the Type field, choose Text Editor.
  • In the Source field, paste the following code:

  • Add the web resource to the Form
2. Configure the OnSave event
  • In the Form Properties window, in the Event Handlers section, set Event to OnSave.
  • Enter the following in the Handler Properties:
    • Type ‘preventAutoSave’ in the Function field. This is case sensitive. Do not include quotation marks.
    • Make sure that Enabled is checked.
    • Check Pass execution context as first parameter.
  • If there are any other event handlers for the OnSave event, use the green arrows to move this one to the top
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!



Источник: https://www.powerobjects.com/2018/08...-dynamics-365/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
powerobjects: Field Service Mobile App: Set up and Configuration for Dynamics 365 Online Blog bot Dynamics CRM: Blogs 0 16.01.2018 01:12
german_nav_developer: Buildnummern-Übersicht Microsoft Dynamics NAV 2013 Blog bot NAV: Blogs 0 15.05.2016 18:12
crminthefield: Podcast and Overview: Microsoft Dynamics CRM 2011 Update Rollup 16 Blog bot Dynamics CRM: Blogs 0 23.01.2014 03:15
NAV Team: How to: Set up your Microsoft Dynamics NAV installation for Single Sign-on with Office 365 using Windows PowerShell Blog bot Dynamics CRM: Blogs 0 19.12.2013 15:10
CRM DE LA CREME! Configuring Microsoft Dynamics CRM 4.0 for Internet-facing deployment Blog bot Dynamics CRM: Blogs 0 18.08.2009 11:05
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 04:41.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.