web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics CRM (Archived)

Alert user on opening case if another user is viewing it

(0) ShareShare
ReportReport
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

I have the same question (0)
  • Suggested answer
    Arun Vinoth Profile Picture
    11,615 Moderator on at

    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.

  • Verified answer
    gdas Profile Picture
    50,091 Moderator on at

    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.

  • ansrikanth Profile Picture
    3,115 on at

    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

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics CRM (Archived)

#1
SA-08121319-0 Profile Picture

SA-08121319-0 4

#1
Calum MacFarlane Profile Picture

Calum MacFarlane 4

#3
Alex Fun Wei Jie Profile Picture

Alex Fun Wei Jie 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans