How to use the reference qual only for ITIL users

Jahnavi6
Kilo Expert

ITIL users should be able to search for users from all locations in "on behalf of" field, otherwise users specific to that location should be filtered in record producer/service portal.

So, for the field, I used the advance conditions, in the reference qualifier like this, but it is not working.

 

1 ACCEPTED SOLUTION

javascript: (gs.hasRole('itil') ? 'active=true' : 'location=' + gs.getUser().getLocation());

View solution in original post

15 REPLIES 15

Jahnavi6
Kilo Expert

Hi,

I have removed my conditions completely. And the variable settings can be seen in the attached screenshot. I am able to see the results if the user has any role, and if i impersonate with someone who doesn't have any role, displays no matches found. 

We have upgraded to Orlando Patch 7 yesterday. 

javascript: var query = ''; if(!gs.hasRole('itil')) query = 'location=' + gs.getUser().getLocation();

else{query = 'active=true'}query;

 

Try this

OOTB behavior:

The read ACL sys_user.* is set to provide access to self profile(for non-itil users) and all users (for itil users). Modify this ACL for the read access.

Can you check the read ACL on sys_user table?

Hi,

It's definitely ACL issue if user with no role cannot see anything.

As mentioned users should have atleast snc_internal role even if users don't have any role given OOB

Regards
Ankur

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

Jahnavi6
Kilo Expert

Thank you all!!

Yes, I'm not able to see the expected result due to the read ACL on User table. Thanks for the info!!