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)

Multiple instances of real time workflow update same field

(0) ShareShare
ReportReport
Posted on by

I've a real-time workflow that updates an integer field. The problem I have is when multiple instances of the workflow run at same time.

The first instance of the worklfow increments by 1 the integer field, but the second and later instnaces take the non updated value, i.e

First instance: Days = 1 -> workflow sets it to 2

Second instance: Days = 1 -> workflow sets it to 2 (Initial value should be 2 and updated value 3)

Third instance: Days = 1 -> workflow sets it to 2

*This post is locked for comments

I have the same question (0)
  • Suggested answer
    Rawish Kumar Profile Picture
    13,758 on at

    Hi Jorge,

    if you cannot control these mutiple updates. I would suggest you to created a boolean field on the same entity & in your workflow when you are done with your logic , update this field to yes.

    next before updating it on a trigger make sure you check if its not equal to yes then only proceed with update, otherwise stop the workflow.

    hope it makes sense.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    Can you please elaborate little more?

    Is workflow is updating integer value in same entity or different one?

    On which message your workflow get trigger?

  • Jorge S Profile Picture
    on at

    Hi Rawish, thnaks for your reply!

    I thought of doing adding a boolean but waiting for the other instances to run until the value is Yes, but anyway all other waiting instances will run when the value changes again at same time, which will cause the same problem.

  • Jorge S Profile Picture
    on at

    The workflow only updates the field in one entity. It runs on a field change.

    Related to Time entry and project approval of Dynamics PSA

    778518625.Capture.PNG

  • Rawish Kumar Profile Picture
    13,758 on at

    its a real time workflow - your update and this workflow will run in a single transaction.  so all updates will have different transactions independent of each other.

    Just play around with it - i am sure you will find a way.

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    You can set increment before any other operation.

  • Jorge S Profile Picture
    on at

    Hi, increment by is the only operation I do in the workflow. There is only the required check before the increment.

  • Jorge S Profile Picture
    on at

    It doesn't work as expected when multiple instances of the workflow run at same time.

    0016555.Capture.PNG

  • Dynamics365 Rocker Profile Picture
    7,755 on at

    First of all, I want to know that how multiple instances get execute?

    As you said This workflow get execute when value of a field get change. It means user is changing value of a field very frequent.

    If it is executing on multiple field change then I suggest you to create a separate workflow for each field change. it will resolve your problem.

  • Jorge S Profile Picture
    on at

    The workflow gets executed when the field ApprovedOn is updated. The user can select many records (up to 250) and approve all of them by cliking a button.

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