How many users opened one incident and how get users list
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2023 06:03 AM
How many users opened one incident and how get users list
2 REPLIES 2
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 12:56 AM
Please refer this link it may helps you.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-21-2024 01:34 AM
You can create a list field on the form and use display business rule to save those users in the list. An outline of the Display BR is as follows-
(function executeRule(current, previous /*null when async*/ ) {
if (current.isNewRecord())
return;
var currentUser = gs.getUser().getID();
var oldusers;
oldusers = current.u_incident_viewers; //List field to store
var user = oldusers.split(',');
var i;
for (i = 0; i < user.length; i++) {
var old = user[i];
if (old == currentUser) {
return;
}
}
current.u_list_viewers += ',' + currentUser;
current.update();
})(current, previous);
Please mark my answer helpful and correct.
Regards,
Amit