What is 'query' checkbox in Business rule?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 09:38 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 09:47 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 09:53 PM
Hey,
Correct, so basically whenever you are querying a table, this business rule will run and return records the same way.
Eg: You write a query business rule on user table and return query as current.addActiveQuery();
What it will do, wherever you try to populate a user in a reference field, or open user table in list layout, it will only return the list of active users no matter what
Aman Kumar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-03-2022 10:04 PM
Hi,
Query business rule is usually used to restrict the records based on some condition/logic similar to table level READ ACLs
More details here with example
Controlling record access using ‘Before Query’ business rules
ServiceNow system security: Before you go crazy with “before query Business rule”
Restricting Access – ACL vs. Before Query Business Rule
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader