Script to exclude Caller from restricted view of Assignment group incidents
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 08:12 AM
I am using the below Business Rule script to block view of incidents assigned to a specific groups from other users that are not in that group. This is causing an error message for the caller.
What line needs to be added to exclude the block from caller, to where the caller can see their submitted incident?
Condition: !gs.getUser().isMemberOf('ServiceNow - HR');
Script:
(function executeRule(current, previous /*null when async*/ ) {
var grp = current.addNullQuery('assignment_group').addOrCondition('assignment_group','!=','5655ec7b47716a10661782b5536d43c7');
})(current, previous);
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-04-2025 03:21 PM
You can add on current.caller_id is not logged in user either in condition or put an if inside your script