Restrict Incident Access: Ultimate Guide to Configuring Assignment Group-Based Visibility in ServiceNow
Table of Contents
Overview
In ServiceNow, you might need to restrict incident access to records so that a specific group is visible. For example, we created a dispatch group and added members to it members of Dispatch group can only view incidents assigned to their own group or those where the assignment group is null. This article provides a step-by-step guide on how to achieve this using a business rule.
Objective
The goal is to configure the business rule so we can restrict Incident Access for the members of the “Dispatch” group can only see incident records where the assignment group is either “Dispatch” or null.
Steps to Create the Business Rule
- Navigate to Business Rules
- Go to System Definition > Business Rules in the ServiceNow application navigator.
- Click on New to create a new business rule.
- Configure the Business Rule
Basic Information:
- Name: Restrict Dispatch Group Incident Visibility
- Table: Incident [incident]
- Advanced:true
- When: Before
- Query: true
In the Advanced tab, use the following script to enforce the visibility restriction:
condition field: gs.getUser().isMemberOf(‘Dispatch’)
Script :
(function executeRule(current, previous /*null when async*/ ) {
// Add your code here
current.addNullQuery(‘assignment_group’).addOrCondition(‘assignment_group’, gs.getUser().getMyGroups());
})(current, previous);
Explanation:
- This script checks if the current user is a member of the “Dispatch” group.
- If the user is a member, it restricts the visibility of incidents where the assignment group is ‘Dispatch’ or null.
- Save the Business Rule
- Click Submit to save the business rule.
Testing the Configuration
- Log in as a member of the “Dispatch” group and try to access various incident records.
- Verify that you can only view incidents where the assignment group is ‘Dispatch’ or null. Ensure that incidents with different assignment groups are not visible.

Conclusion
By creating and configuring this business rule, you can effectively control the visibility of incident records for the “Dispatch” group in ServiceNow. This approach helps ensure that users see only the records relevant to their role, maintaining data security and relevance.
For further customization or troubleshooting, consult related to ServiceNow contact us