Illegal access to method getName in class com.glide.sys.User

suryan
Kilo Expert

when a user logs in he should get the Cases requested by him in "Requested by me" section, i applied created by is javascript: gs.getUser().name; in filters, But iam getting error as "Illegal access to method getName in class com.glide.sys.User" ..

1 ACCEPTED SOLUTION

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

You should probably use opened by instead, this way that field is a reference to the user table and you can use the dynamic filter.   So Opened By, is dynamic, me.



If you really need to use created by, that just stored the userID, so it would be javascript:gs.getUserID()


View solution in original post

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

Hi Suryan,



Are you using scoped app? Where have you applied the filter can you share the screenshot?



Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.


Thanks


Ankur


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

Michael Ritchie
ServiceNow Employee
ServiceNow Employee

You should probably use opened by instead, this way that field is a reference to the user table and you can use the dynamic filter.   So Opened By, is dynamic, me.



If you really need to use created by, that just stored the userID, so it would be javascript:gs.getUserID()