logged in user to see only it's own assigned cases

Damian Martinez
Mega Sage

Hello Community, I hope everyone is ok.
I have set up a new user and I have been told that this new user only needs visibility on the cases assigned to him.
Does somebody know how to accomplish this? I guess I have to setup ACL or business rule, but not sure.

Thanks in advance!

18 REPLIES 18

Weird
Mega Sage

It's quite easy to do. Just go to the ACL table (from the navigator search ACL) and make sure you've elevated yourself (under impersonasion security_admins can select "Elevate Roles").

Then you'll create an ACL for your table.
For example to give access to a table you'd make an ACL like this:

find_real_file.png

Here we say that a person can see all records on incident table where they are the assigned to person.
If they can't see the fields then there could also be a field rule and you can just copy this one and add a * on the selection that currently says NONE.

Similarly write access can be given by adding ACL's where the operation field is "write".

 

The can also be rules like incident.caller_id which restricts access to the field itself and it overwrites the incident.* rule. If your user can't see or edit a specific field then you'll also need to create new rules for that field specifically. Also on extended tables it's possible that there's a ACL on the parent table (task for example) which is inherited by the child table (lets say incident). This means that even if incident doesn't have a field level rule it might be set on the task level.

 

Hello Joni,
thanks so much for providing this example, my question is, this ACL will affect every single logged in user correct?

However the requirement is that the new user can only see cases assigned to him, but the rest of users can see the rest of records.

So the ACL needs to apply only for one user.

Thanks.

Ankur Bawiskar
Tera Patron
Tera Patron

@Damian Martinez 

you can use query business rule for this on that table

BR Condition: it runs only for specific user and for interactive sessions

gs.getSession().isInteractive() && gs.getUserID() == 'specificUserSysId'

Script:

current.addQuery('opened_by', gs.getUserID());

Regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Hello Ankur,
thanks for your advice, can you guide me a bit?
In the business rule condition, where do I insert this code?

gs.getSession().isInteractive() && gs.getUserID() == 'specificUserSysId'

find_real_file.png