How can I limit an assignment group to view only their incidents assigned?

Jesus Nava
Tera Guru

Hello experts, please I need your help, I was asked to do the following:

1. Create a group

2. this group will get incidents assigned.

3.Users will be able to view only those incidents assigned to their group, they cannot see any other type of record, just their incidents assigned.

Note: Users don't have itil role, the idea is that this group will view and write only their incidents assigned.

I tried doing this using a BR:

JesusNava_0-1673300155588.png

 

Condition: !gs.hasRole('admin')||gs.getUser().isMemberOf("Group created")

Script: 

var grp = current.addNullQuery('assignment_group').addOrCondition('assignment_group','!=','group created sys_id');

 

I impersonated a user from the group but does not see the record, am I missing something?

JesusNava_1-1673300296666.png

I got this from: 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0790987

 

Thank you in advanced!

 

1 ACCEPTED SOLUTION
4 REPLIES 4

Thank you Mike, this works if I add itil role to the user but, I was asked to do this without granting the itil role to the user, can that be done? I mean can a user with no itil role view incidents assigned to them?

Thank you

Ah I didn't see that part. No, this is not possible without creating a custom roles and modifying the ACLs. (which is not recommended and will consume a license anyway).

If you don't want to grant the full ITIL role, there's a role called "sn_incident_write"

https://docs.servicenow.com/en-US/bundle/tokyo-it-service-management/page/product/incident-managemen...

 

Than you Mike, it was an awesome help!