How could I solve this problem that has been presented to me (I detail the following)
User 1 performs a select to an entity "A" and obtains a correlative "1" and at the same millisecond and
User 2 performs a select to the same entity and obtains correlative 1 (given with the error) because it should take the 2 (assuming that the 1 was already taken).
How could I solve that problem
I was reading and an alternative would be to use concurrency obtimista, but I do not know how to apply that concurrency.
I need help.
*This post is locked for comments
But how would you do to avoid that at the time of making an entity select a value and user 2 to make the same select get the same value as the first user. (Block reading to that entity until the end of the process to take different values, I think that would be so?)
Hi! I'm guessing you're talking about optimistic concurrency in Dynamics 365?
What this means is that when you retrieve a record you get a row version, or ETag if you're using the web api. This is the version of the record you're viewing.
When you update the record you include that row version to see if anyone else did a modification since you retrieved the record.
Mind you, this is only used in the API so there is no out of the box way to do this in the user interface. You can solve that with a mix of plugins on retrieve and update which effectively stores the row version while you edit the record.
There's a good example of how to use optimistic concurrency in the official docs here:
docs.microsoft.com/.../sample-use-optimistic-concurrency-update-delete-operations
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