I've thought of a few ways of handling this using locking booleans but struggle to reset then a user stops viewing a case.
What I want to do is have an alert to the user when they open the record if another user is currently viewing the record.
It's feasible that a case could be opened by multiple users at virtually the same time and before either have had a change to review it and take ownership.
*This post is locked for comments
I don't think you can make it 100% foolproof solution considering the fact that 2 users may open the same case at the same time. However, you can definetly restrict users not to overwrite one another modifications by simply checking the RowVersion number in plugin or even simpler making a note of odata's "etag" onload of the form and compare it on save with version number.
maybe even a bit brute-force method is to keep a JS timer, do a odata retrieve for etag verification and refresh page data to be upto date (close to upto date) in all clients.
-Srikanth
Hi,
This could be handle using custom logic to restrict user to being save if it's open. Following steps you could do -
- Create a new entity let say it's called interaction where you can create fields like case I'd ,userid ,last viewed date, operation (active,inactive).
-At the moment user will view any case you will enter a record in this entity using javascript onload. This record will be update every time when user view new case updating case I'd,operation. So for a user only one record will be there in the interaction entity.
- Now lets say user A who is open case C and in the interaction entity the entry is available with Active operation.
- Same time user B is open the case record you need to check in JS onload event in interaction entity any active operation is there with the same case I'd if yes you can show some confirmation box that do you want to inactive other user operation ? If yes then update other user interaction operation inactive and create/update new interaction record with active operation.
- While any changes happen in the onsave event you need to check whether the user doing changes interaction operation active mode and the proceed for save. If interaction operation is inactive then dont allow to save saying that someone has active operation in interaction.
Hope this helps.
CRM is stateless application, concurrency cannot be tracked.
For your scenario only we have QueueItem concept. Cases will be added to queue, that item can be released after set worked by.
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