Skip to main content

Case Viewers

 

To prevent multiple users from working on and updating the same case simultaneously, we can create an Aura component that displays the viewers of a case, showing their profile images along with their names when hovering over the image.

How does this component work?

  1. When a case record is loaded, it captures the current user's ID and stores it in a Long Text Area field (with a 131,072 character limit) as a comma-separated list.
  2. Once the user closes the case record console tab, their ID is removed from the field.
  3. By default, the component will be hidden on the record page. However, when there is more than one user viewing the case, the component will display the profile image and name of the other user. For example, if both you and another person are viewing the case:
    • For the other person, it will show your profile image and name. 
    • For you, it will show the other person’s profile image and name.
  4. Each time the field is updated, a platform event is published through a case trigger, which is then subscribed to by the Aura component.
  5. The component uses the platform event data to display the user information of those viewing the case.

Code posted below.

 

#Service Cloud  #Case Management  #Cases View  #Case Views

7 comments
  1. Sep 2, 2025, 1:43 PM

    @Balu Chennupati Thanks! I'll check out your article and look into Record Watcher. I'm brand new to being a SF Admin, so I appreciate you taking the time to share. 

0/9000