Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Concurrence in Dinamica CRM 365

Posted on by
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

  • RE: Concurrence in Dinamica CRM 365

    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?)

  • Suggested answer
    Marius Agur Pedersen Profile Picture
    Marius Agur Pedersen 1,771 on at
    RE: Concurrence in Dinamica CRM 365

    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

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