Script to exclude Caller from restricted view of Assignment group incidents
- 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:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 08:20 AM
Can you remove some from group name keep as "Servicenow-HR" then validate?
Have you written before query business rule? Please check
If these points are helpful and resolved your issue, then marked as accepted/helpful.
--
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 08:25 AM
Can you remove some from group name keep as "Servicenow-HR" then validate?
Please clarify
And yes, I have in the When to Run section:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 08:27 AM
If you're on Yokohama or beyond, you can take advantage of security data filters to fulfil requirements like this. Take a little look at the article below, it's very good and explains all the different security options really clearly:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-03-2025 09:43 AM
Could you add "&& current.caller_id != gs.getUserID()" to your condition so it will not run if the caller is the current user