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)

Dynamics crm Workflow executed twice on change Stage BPF

(0) ShareShare
ReportReport
Posted on by 5

hello community 

Actually I am tring to create a workflow when a Stage change in the BPF in order to calculate a duration per stage 

The issue is that when I change a stage the workflow(a background workflow) is executed twice ==> in consequence

I got 2 records created in my new entity (stage duration ) per stage per opportunity 

This is my workflow :

7065.Capture-1.PNG

This the system task the workflow is executed twice 

4403.Capture-2.PNG

Consequence 2 records created in the same time 

6560.Capture3.PNG

Anyone had already faced the same issue ? Please let me know 

PS: I work on dynamics crm 2015

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Sreevalli Profile Picture
    3,256 on at

    Hi,

    you must be having any other trigger on stage/all fields update. check it in plugin registration tool.

    Make sure of having check condition on date before updating.

  • Jamil Lamyae Profile Picture
    5 on at

    THANKS a lot Sreevalli

    That's true, I had a save() in javascript that's caused the double executing of my workflow

    But what do you mean by : 'Make sure of having check condition on date before updating' which kind of check in condition ?

  • Suggested answer
    Sreevalli Profile Picture
    3,256 on at

    Hi,

    If you are using separate date field to capture the duration, then it will resolve, if you check the field value is null then only update. Because if it is already filled with your 1st update then it will stop the workflow in the second execute.

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

    Hi,

    Please check the condition properly in which your workflow is triggering and check what  action you are doing on stage change  like save , update  under  stage change operation whether its  JS/ plugin/workflow itself  . You can not control running workflow twice by putting additional validation , but you can skip your code where you are doing additional action  by which workflow triggering twice.

    So I believe you  can do this , as you are aware of the functionality where you are doing what.

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