Access Control List read records Created By User

tharzarob
Kilo Explorer

How do I set the read ACL on a table to only allow users to read records that they have created?   I have been trying to add the following conditions without luck

Created By is javascript.gs.getUserName() OR Created By is empty

I am working in the Geneva instance.

1 ACCEPTED SOLUTION

I THOUGHT SO!!! t! It's not in the wiki, it's on the developer API site.



Best practice is to use conditions before scripts, so...



Created by | is | javascript:gs.getUserName()


View solution in original post

13 REPLIES 13

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

It should be


current.sys_created_by = gs.getUserName()


NOTE : In the below script box paste the script mentioned above.


Screen Shot 2016-07-22 at 11.42.18 AM.png


http://wiki.servicenow.com/index.php?title=Using_Access_Control_Rules


Thanks Abhinay.


It should be current.sys_created_by = gs.getUserName()


Chuck Tomasi
Tera Patron

Use the conditions field rather than a script.



Condition: Created by | is (dynamic) | Me



No scripting required!


Using Filters and Breadcrumbs - ServiceNow Wiki


Abhinay Erra
Giga Sage

Created is a string field which store email address. Use this


current.sys_created_by == gs.getUser().getEmail()