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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Workflow being fired twice from field update

(0) ShareShare
ReportReport
Posted on by 5

I have a piece of javascript that fires on an event.  Along with checking for certain fields to be completed it sets a custom field (option set) to a value indicating what the current stage is.

For this example the supervisor has submitted the report to the manager for review.  Looking at the audit history I see this.   

9/23 6:22

Update Submitted to Manager Submitted to Manager
9/23 6:22 Update Pending Submission Submitted to Manager

*This post is locked for comments

I have the same question (0)
  • Bruno Lucas Profile Picture
    5,421 on at

    which event is triggering this script? could the function also be running onload whenits set to initially run on save?

    you can check the dependencies over that option set that gets updated

    if you find something like a workflow, you can check this workflow and its dependencies to see if it is not recursive (calling back another process)

  • Verified answer
    Aileen Gusni Profile Picture
    44,524 on at

    Hi David,

    Did you use any force save function in your code?

  • Verified answer
    Hosk Profile Picture
    on at

    You should check to see if you have any javascript/workflows/plugins/business rules which are firing off the change of that field.

    javascript save could happen onchange, onload, or onsave.  

    The javascript could save the form and then an onload/onsave adjust it again

  • NatrajY Profile Picture
    3,040 on at

    What rollup are you on? 6.1.1 (SP1 UR1) fixes issue where duplicate records are created when save is pressed mutiple times. If you have not installed SP1, this was fixed in UR3.

    Relevent line from 6.1.1 release notes

    "Duplicate records created if Save or Save and Close is pressed multiple times"

    support.microsoft.com/.../2953252


    EDIT: Didn't realise you said update and not create. Ignore this post.

  • djamr Profile Picture
    5 on at

    TGhanks for the suggestion, I didn't think about this approach.  It is not the cause, but a great thing to know.

  • Suggested answer
    djamr Profile Picture
    5 on at

    Hi Aileen, kinda.

    I got pulled away on something and just got back to this last night.  In my code I'm issuing a .save() and the a .close().  Looks like the save and close are both firing the save and even if the value has not changed it is being marked as a save a triggering the workflow.  I removed the .save() and happiness is once again achieved.

  • djamr Profile Picture
    5 on at

    Seems like this might be related to one of the fixes in SP1 UR1.

  • Aileen Gusni Profile Picture
    44,524 on at

    Hi David,

    It happened also in our development before, because we had code that fires force save submission, and then we see the audit history, got same time, but two submission.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
JS-09031509-0 Profile Picture

JS-09031509-0 3

#2
AS-17030037-0 Profile Picture

AS-17030037-0 2

#2
Mark Eckert Profile Picture

Mark Eckert 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans