- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 03:32 AM
We have hidden incidents from all users and made only visible to "Desktop support" group members.
Now , We have requirement to make incidents visible to the user selected in "Requested For" variable on record producer.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:08 AM
Try below code-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 04:55 AM - edited 04-02-2025 04:56 AM
Hello @VanishreeG ,
Please replace your entire code with the following:
var sysIdOfDesktopSupportGroup ='POPULATE THIS WITH THE CORRECT SYS_ID';
if (!gs.getUser().isMemberOf(sysIdOfDesktopSupportGroup)) {
current.addQuery("opened_by", gs.getUserID());
}
This is assuming that "opened_by" is the field that your "Requested For" variable gets mapped to. If it's the Caller then adjust accordingly. Please also make sure the "Query" checkbox on the BR is selected.
Regards,
Robert
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:08 AM
Try below code-
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2025 05:18 AM - edited 04-02-2025 05:23 AM
@VanishreeG I honestly do not understand why this was chosen as the solution instead of the script that only requires 4 lines of code. And only 2 minutes after it was posted.