- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 03:48 AM
Hi Techies,
I am following one of the KB of ServiceNow
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0790987
But somehow it is not working as expected. When I am executing it, it is completely Hiding the Incident, not even visible to group member not to admins.
Suggestions would be appreciated.
-------------------------------------------------------
My Script
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 04:00 AM
Hi @DKSINGH ,
please try with below code
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.addQuery('assignment_group','!=','81d9b6f21bf1ce9851e0eb52604bcb7f');
})(current, previous);
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 04:00 AM
Hi @DKSINGH ,
please try with below code
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.addQuery('assignment_group','!=','81d9b6f21bf1ce9851e0eb52604bcb7f');
})(current, previous);
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 04:19 AM
Hi Sarthak,
Thanks for the response,
it is also showing same behaviour, INC is completely not visible to others and even to groups member and admin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-30-2024 04:27 AM
It worked, after using sys_id of the assignment group instead of group name.
Thanks @Community Alums
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2024 03:34 AM
Hi Sarthak,
Can you please also Guide on the condition, how to achieve
My requirement is basically I have created an additional view on Security Incident table which will be used by members of different teams who are divided by different Business Units, that means that team is having multiple Assignment Groups. So
Default View Will be used By D1, D2 & D3
Custom View Will be used By C1, C2,C3,C4,C5,C6.
And both should not see Incident Assigned to each others View, but they can see Incidents of each other among their specific views