How restrict row level to users
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2024 07:25 AM
Hi There,
Itil admin can see only inactive incident records only.
How many we can restrict records ?
I know with Before query BR and ACL
Any one suggest me how can I restict with ACL any sample script pls.
Regards
Rajesh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 10:34 AM
You want to see only inactive records itil_admin, So In this case your restricting the records That's not how ACL works.. You should go with query business rules, that is the right approach

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-03-2024 09:47 AM
Hi @Gillerla Rajesh ,
I tried your problem in my PDI and it works for me
Please create query Business rule on incident table and add below script
In Condition
gs.hasRole("itil");
(function executeRule(current, previous /*null when async*/) {
// Add your code here
current.addQuery("active", false);
})(current, previous);
Result
When imporsonated with ITIL user
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
08-03-2024 09:57 AM
Hi @Community Alums
Query BR i know, I need how with ACL
And how many ways we can control row level records
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-04-2024 12:25 AM
@Gillerla Rajesh please follow this article to create row level article it's provided in servicenow doc with screen shot which you can replace with respect to your table.
I will suggest to be more concious when create before display business rule because it also impact on other places and just think of if anybother places required those data will also be impacted due to business rule.
hope this will be useful.