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

Community site session details

Session Id :
Customer experience | Sales, Customer Insights,...
Suggested answer

Asynchronous workflow issue with counter increment

(0) ShareShare
ReportReport
Posted on by 700

Hi,

We have developed the asynchronous workflow in that we have logic to increment  the counter in of our entity. It is working fine when we checked with the few users but when multiple users create/update the records same time then it assign the duplicate counter so it will failed our logic. 

We tried to use the locking by updating the dummy record but it was not works due to asynchronous workflow. 

Is anyone have same solution for the same to increment counter without duplicating in asynchronous workflow assembly.  

Waiting for your reply.

Thanks!

Balasaheb

I have the same question (0)
  • Joana Pinto Profile Picture
    740 on at
    RE: Asynchronous workflow issue with counter increment

    Hi,

    If you are using an auto number solution, don't use an async workflow. Use an synchronous workflow because you want the counter to be updated right in that moment, now allowing other process to run.

    Regards,

    Joana

  • Suggested answer
    sardar ahmed Profile Picture
    520 on at
    RE: Asynchronous workflow issue with counter increment

    Hi,

    Try changing your workflow to synchronous

  • Suggested answer
    Mahadeo Matre Profile Picture
    17,021 on at
    RE: Asynchronous workflow issue with counter increment

    Asynchronous workflow will run on its own schedule, and it might be multiple instances of workflows will execute at same time to process more records, and that is causing for duplicate auto number.

    As above mentioned you need to convert Asynchronous workflow to Synchronous then only it will work properly or create Plugin which will be executed on Pre-create event, which will get autonumber first and then record will be created.

    Hope this will help..  

  • Balasaheb Profile Picture
    700 on at
    RE: Asynchronous workflow issue with counter increment

    Hi,

    Thanks for your reply but we do not want synchronous workflow. We have to keep workflow running  Asynchronous mode.

    Is there any way to do the same in Asynchronous workflow.

    Thanks!

  • Joana Pinto Profile Picture
    740 on at
    RE: Asynchronous workflow issue with counter increment

    Hi,

    Sorry but why can't you have synchronous workflows? Because I don't think that's possible to achieve this with asynchronous methods. You will not guarantee the value will be valid.

  • Balasaheb Profile Picture
    700 on at
    RE: Asynchronous workflow issue with counter increment

    Hi,

    We have used the Optimistic concurrency mentioned in below link but when exception thrown when data mismatch then we catch we again call function to retrieve and update that record once again but some time it goes into loop and thrown stack overflow error. Can any one use this and face same issue and have solution to resolve it.

    docs.microsoft.com/.../dn707955(v=crm.8)

    Note: We have checked this in Async workflow and we want this in Async workflow only.

    Waiting for your reply.

    Thanks!

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…

Abhilash Warrier – Community Spotlight

We are honored to recognize Abhilash Warrier as our Community Spotlight honoree for…

Leaderboard > Customer experience | Sales, Customer Insights, CRM

#1
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 258

#2
MVP-Daniyal Khaleel Profile Picture

MVP-Daniyal Khaleel 186

#3
Tom_Gioielli Profile Picture

Tom_Gioielli 130 Super User 2025 Season 2

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans