How – To Series 16: UR 12 – Downside of Auto Save feature

Update: This issue is fixed now with MS CRM 2013 Org Level Setting. Following is the update:
https://connect.microsoft.com/dynamicssuggestions/feedback/details/777281/ur-12-auto-save-feature-causing-workflows-plugins-to-be-triggered-multiple-timesHi all,
UR 12 has introduced a nice feature called “Auto Save” which will save the CRM Records(only Process Driven UIs) in the background automatically when it get updated by the user in UI.

When a field value changed by user, in the bottom right corner a label as “Unsaved Changes” gets displayed:

After few seconds(15-20 sec), forms gets saved automatically:

From usability point of view, it’s a very nice feature… then what’s going wrong??

When I came to know about this feature, few things came to my mind:

Scenario1: Lets say I have registered a workflow or a plugin on “onChange” of a field called “fax” in “account” entity. User has entered some value(1234) in the “fax” field and went on to fill other fields. After few seconds(lets say 20 sec) form gets saved automatically in the background. Incase if user feels he entered some wrong value in “fax” field so he/she modified the field again.

Prior to UR12 or with Classic Forms: User saves the form manually. Even though user modifies the same field twice, field value gets saved to the database once(in one transaction). And the workflow which is registerd will fire once and completes it’s tasks.

with UR12 Process Driven Froms: As user modifies the same field twice(one before the auto save and one after the background save), field value gets saved to the database twice(in two transactions). And the workflow which is registerd will fire twice…..

Scenario2: Lets say I have registered a workflow or a plugin on “onChange” of fields called “fax” and “email” in “account” entity. User has entered some value(1234) in the “fax” field. After few seconds(lets say 20 sec) form gets saved automatically in the background. Then user modifies the “email” field. After few seconds form gets saved in the background

Prior to UR12 or with Classic Forms: User saves the form manually. workflow will be triggered only once.

with UR12 Process Driven Froms: As user modifies two fields (one before the auto save and one after the background save), two field values gets saved to the database in two different transactions. And the workflow which is registerd will fire twice…..

To verfiy that, I have registered a workflow on “fax” and “email” field. Added a step to attach notes with fax and email field vlaues:

Result after Scenario 1:

Workflow instances:

Created Notes:

Created Notes when fax got updated to 1234

Created Notes when fax got updated to 1234567

In the same manner, for the second scenario too workflow got triggered twice…

Is it the expected behavior??? or Is it a design glitch??? or something am I missing??? So, if we gonna use Process Driven forms then what should be the considerations for extending the entity behavior??

Fingers Crossed….!!! 🙂

Share me your thoughts…!!!

8 thoughts on “How – To Series 16: UR 12 – Downside of Auto Save feature

  1. Shai

    I don't like it also , Another scenario: you change some fields values and you notice you on the wrong record , you can't close the form and discard the changes , it was auto-saved.

    Reply
    1. dyncrmblog Post author

      It's not about handling data corrections in the workflow/plugins. When multiple field changes occurs on a form, high probability that registered workflow/plugin on update will be triggered multiple times instead of only once. In a typical call center scenario, assume a representative on a call with the customer for an existing open case. During the course of the call which lasts for couple of minutes where representative might update the case record. In this scenario, what if a workflow/plugin registered on the update(for few fields)of the record and how many times the workflow/plugin will trigger?

      Reply

Leave a Reply

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