Restrict the users in list view
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2022 06:55 PM
Based on the role(maybe ITIL or itil_admin or any role), Restrict the user in the list view(show only active incidents or critical incidents or Only new incidents)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2022 07:02 PM
Hi @Basha4
You can achieve it using Query Business Rule on Incident.
In your EncodedQuery you can add these Conditions of Critical, Active and New.
Thanks
Anubhav Ritolia
ServiceNow Rising Star 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2022 08:09 PM
Please write a code for this one
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-20-2022 09:32 PM
Hi @Basha4,
You can use the below sample code on your BR query.
if(gs.hasRole('admin') == true){
current.addEncodedQuery('active=true^priority=1');
}
You may also refer on this community post Before query business rules example?
I hope this helps.
Please mark the response as helpful if this helps and Accept if this solves your issue.
Regards,
Jeff