gs,getUserId returns wrong value in ACL while impersonating
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hello Guys,
I'm trying to check if the Requested by user is the same loggedIn user so i checked this in the ACL but gs.getUserID returns my ID not the impersonated user
here's the code :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
don't try to test ACL with impersonation.
Try to clear instance cache and then impersonate
Did you check with actual user?
it should give the correct logged in user sysId
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
an hour ago
Hello @Ankur Bawiskar ,
thanks for your support.
but i did this already and still get my ID instead of the impersonated user so i just need to check if the cases created by person is the same loggedIn user, is there anyway?