Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

workflow help

Posted on by Microsoft Employee

Hello

I have a workflow that waits for a few on change events and executes based on the value of a field. The workflow creates a new queue item based on the value of the field. The only different between the different queue items is the queue its assigned to. so effectively a queue routing workflow based on the value of the field. This all works fine and well except for one problem.

Sometimes in a single queue it will add the item twice or three times. all of them point back to the same record but in the queue it appears multiple times. I suspect that whats happening is that the workflow fires, and then on change occurs again and it fires again before the first one has had a chance to execute on the record. This in turn calls both of them to fire off at in parallel thus creating multiple queue items. Under normal circumstances i understand that if one queue item is created and after the second workflow executes , instead of creating a new queue item it would re parent the queue item to the correct workflow and clean up the extra record. but since they run at the same time i think whats happening is that its adding it to the queue twice.

 Does anyone have any suggestions on how to approach this problem. is there a way to limit the workflow to only run one at a time? wait for the first instance to finish and run in order for the same record.

regards

*This post is locked for comments

  • ashlega Profile Picture
    ashlega 34,475 on at
    RE: workflow help

    In theory, they can probably run in parallel, especially if there are multiple async services? Not sure though.. I'm curious as to why would it run again, though. Is it possible to modify the logic?

  • tpeschat Profile Picture
    tpeschat 4,926 on at
    RE: workflow help

    I don't think that the workflow instances would run in parallel.

    You could add an additional y/n field to the form, that is set to y, after a Queue item has been created. And than add a check condition to the workflow, that you only create a Queue item, if this field is not equal y.

    Hth Thomas

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!

Community AMA December 12th

Join us as we continue to demystify the Dynamics 365 Contact Center

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans