Skip to main content

Notifications

Microsoft Dynamics CRM (Archived)

Alert user on opening case if another user is viewing it

Posted on by 1,540

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

  • ansrikanth Profile Picture
    ansrikanth 3,115 on at
    RE: Alert user on opening case if another user is viewing it

    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

  • Verified answer
    gdas Profile Picture
    gdas 50,085 on at
    RE: Alert user on opening case if another user is viewing it

    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.

  • Suggested answer
    Arun Vinoth Profile Picture
    Arun Vinoth 11,613 on at
    RE: Alert user on opening case if another user is viewing it

    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.

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