Facing issue in setting the Business rule as per the requirement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 06:29 AM
Hello ServiceNow Community,
I’m seeking guidance on implementing a business rule for an updated requirement on our Incident, Request also on service operations workspace incident, request records. The requirement is as follows:
1. Users with the ITIL role should only be able to view records where the confidential checkbox is set to true.
2. A business rule needs to be created so that if a logged-in user has both the ITIL and confidential view roles, they should only be able to see records with the confidential checkbox set to true.
We’ve attempted to implement this using a business rule, but during testing, we found that users with the ITIL and confidential view roles could still see all incident records, regardless of the confidential checkbox setting. This seems to be overriding the ACL and other existing rules.
Could you please provide any solutions, approaches, or configuration examples on how to achieve this functionality? Any advice or guidance would be greatly appreciated.
Thank you in advance for your assistance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-12-2024 10:10 AM
@jaymala_marathe You can achieve this using a query business rule on the incident table. In the condition field of the business rule you can check the user role
gs.hasRole('itil')&&gs.hasRole('confidential_view')
in the script field you can add the following condition.
current.addQuery('u_confidential',true); //Assuming confidential checkbox field name is u_confidential
Hope this helps.