Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

ACL and impersonate

huyjor
Tera Contributor

Hello Team 

 

I have a custom table that has records of student registrations with acl student role. I have these people records below. If I impersonate John Smith, I only can see his registration record in the custom table. I don't want to see Adam Smith record or Tony Smith's record. I don't know if that is possible to do in ServiceNow. Please let me know how. Thanks for your help. 

     John Smith

     Adam Smith

     Tony Smith

 

4 REPLIES 4

Deborah Brown L
Kilo Sage

Hi @huyjor ,

 

1. Open the module edit of that table.

DeborahBrownL_0-1710999733633.png

2.  Add "&sysparm_fixed_query=u_logged_in_user=javascript:gs.getUserID()" in the argument field.

u_logged_in_user = should be the name field.

 

DeborahBrownL_1-1710999824811.png

 

so i can replace u_logged_in_user with the any name of the field. I tried to replace with one of the field. It doesn't show anything. Can it be multiple fields with commas or semi colons. 

 

@huyjor ,

 

Yes you have to replace "u_logged_in_user" with any of the field name and yes you can use multiple fields too but you should use "^" in the middle.

After doing the changes, wait for a while, then close the module and open it again from left navigator. then you can see the changes.

 

If  you find this useful, please give a thumbs up and mark it as a accepted solution.

 

Thanks,

Deborah Brown

i tried this below. When i impersonated a user, i see nothing 

 

&sysparm_fixed_query=first_name^last_name^email^phone_number^current_address^city^state^zipcode=javascript:gs.getUserID()