How to restrict users to show only those incidents either created by user or to group of user

ashu1612
Tera Contributor
 
3 REPLIES 3

Mark Manders
Mega Patron

By ACL or Query BR. 


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

Vrushali  Kolte
Mega Sage

Hello @ashu1612 ,

To achieve this requirement you can write a Query business rule Or you can also create a ACL .

 

ACL - 

  • Navigate to Access Control Rules:

    • Go to System Security > Access Control (ACL).
  • Create a New Access Control Rule:

    • Click on New.
  • Configure the ACL:

    • Type: Choose Record.
    • Table: Select Incident.
    • Operation: Choose read (to restrict view access).
    • Condition: Use a condition script to specify the access criteria.

    Example Condition Script:

    // User can see incidents they created or incidents assigned to their group
    (current.caller_id == gs.getUserID() || current.assignment_group == gs.getUser().getGroup()) && !gs.getUser().isLoggedIn()

    using BR -
     
     
     
    If my answer solves your issue, please mark it as Accepted and Helpful!

 

Mohammed Al-Mar
Tera Guru

To restrict users in ServiceNow so that they only see incidents created by them or assigned to their group, you can use Access Control Rules (ACLs)

 

In the Condition field, specify the logic to restrict access. Use a script similar

(current.opened_by == gs.getUserID() || util.getUserGrups(gs.getUserID()).includes(current.assignment_group))

 

I hope this helps