Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics CRM (Archived)

Dynamics crm Workflow executed twice on change Stage BPF

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

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Dynamics crm Workflow executed twice on change Stage BPF

    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.

  • Suggested answer
    Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: Dynamics crm Workflow executed twice on change Stage BPF

    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.

  • Jamil Lamyae Profile Picture
    Jamil Lamyae 5 on at
    RE: Dynamics crm Workflow executed twice on change Stage BPF

    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 ?

  • Verified answer
    Sreevalli Profile Picture
    Sreevalli 3,256 on at
    RE: Dynamics crm Workflow executed twice on change Stage BPF

    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.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans