web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Form is saving changes twice

(0) ShareShare
ReportReport
Posted on by 1,328

When updating a field on Opportunities and looking in the audit history, the change seems to be saving twice, and therefore it is firing an email workflow twice. For some reason this does not happen every time. Anyone know why? I did notice that when it does happen, the form refreshes immediately after I click save. 

I also do not have any Javascript on the OnSave event, only OnCreate. 

We have Auto-Save enabled but I also added the Save button to the ribbon, which I thought might cause this. But this has happened when using this button and the Save diskette at the bottom right.

8463.Capture.PNG

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Temmy Wahyu Raharjo Profile Picture
    2,916 on at

    Hi,

    This issue might because of your customization. Please check is there any customization either plugin or javascript. Maybe the plugin runs on PostOperation then update again the current record. Then it invoke again the same workflow.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    I am not sure what customization you did for Opportunities entity  , however check following things -

    - Is there any On Save function registered  in form level.

    - Need to check your code , is there any Xrm.Page.data.entity.save() you have write in your code which is firing in onsave event.

    - Go to settings -> Customization --> Customize the System --> SDK Message Processing , check any plugin step registered for this entity.

    - Make sure you have used depth check in your plugin if you have any.

    - Try to disabled auto save , form on save event and disable all plugin step and test .

    Hope this helps.

  • epark06 Profile Picture
    1,328 on at

    [quote user="Goutam Das"]

    I am not sure what customization you did for Opportunities entity  , however check following things -

    - Is there any On Save function registered  in form level.

    - Need to check your code , is there any Xrm.Page.data.entity.save() you have write in your code which is firing in onsave event.

    - Go to settings -> Customization --> Customize the System --> SDK Message Processing , check any plugin step registered for this entity.

    - Make sure you have used depth check in your plugin if you have any.

    - Try to disabled auto save , form on save event and disable all plugin step and test .

    Hope this helps.

    [/quote]

    -We have no On Save function registered on the form.

    -We have two Post-Operation Update steps registered on the Opportunity, one of which is a custom plugin which I prefer not altering. The other is "ActivityFeeds.Plugins.OpportunityUpdate: Update of opportunity for ProbabilityUpdate" - do you know what this does and if I can safely disable it?

    -I do not know what depth check is.

  • gdas Profile Picture
    50,091 Moderator on at

    In your custom plugin are you updating opportunity record ?

    The depth check is nothing but its a  context property which is handle infinite loop. Let say you have registered a plugin in post update event of opportunity , and inside plugin you are making another update request , so your plugin will fire again and again due to ufor that update request.

    To  avoid this we need to check the depth of the plugin .

    IPluginExecutionContext context = localContext.PluginExecutionContext;

    if (context.Depth > 1)

        return;

    For more information please refer below-

    crmbusiness.wordpress.com/.../stopping-infinite-plugins-with-parameters-depth-and-parentcontext

    You can deactivate   "ActivityFeeds.Plugins.OpportunityUpdate: Update of opportunity for ProbabilityUpdate" step  to check whether its making impact or not . If its not then you can enable it again.

  • Arun_CRM Profile Picture
    15 on at

    Hi Goutam,this answer saved a day Thanks and appreciate!!

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans