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
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!
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.
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!
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..
Hi,
Try changing your workflow to synchronous
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
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,253 Super User 2024 Season 2
Martin Dráb 230,188 Most Valuable Professional
nmaenpaa 101,156