No value for "current.sys_id" in ACL script?

andersfigenscho
Kilo Expert
Kilo Expert

Hello,

I am working in the ACL script for the task table, and I am trying to retrieve the sys_id for that open task form.  

My understanding is that I could use current.sys_id to find this value, but for some reason I am getting no value from this.

gs.print(current.sys_id) shows "". (empty value).

Any idea why?

Thanks for any suggestion.

- Anders Figenschow

Symfoni

1 ACCEPTED SOLUTION

Hej Anders,


If two or more rules match at the same point in the processing order, the user must pass any one of the ACL rules permissions to access the object. For example, if you create two field ACL rules for incident.number, then a user who passes one rule has access to the number field regardless of whether the user failed any other field ACL rule at the same point in the processing order.




Please enable "debug security rules" and verify which ACLs that are running




View solution in original post

11 REPLIES 11

Brad Tilton
ServiceNow Employee
ServiceNow Employee

What happens if you use gs.log instead?


Unfortunately, how I log it doesn't change anything.


I always get no value from current.sys_id.



This code



gs.print('print current.sys_id = ' + current.sys_id);



gs.log('log current.sys_id = ' + current.sys_id);



Returns:



16:16:03.933: : print current.sys_id =


16:16:03.939: : log current.sys_id =


Brad Tilton
ServiceNow Employee
ServiceNow Employee

Well you should be able to access the current object from the ACL. Could you post a screenshot of the the ACL?


At the moment it's not much to see.  


I removed everything from that script to make sure nothing was in the way of getting the right values.


Now it's just typing those lines above and setting answer to true.



When I finally get some current.* values out I can use that to address some other related tables.