g_user.getUserName() doesn't work in Workspace.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 03:05 PM
Hello,
g_user.getUserName() works on Platform view but doesn't work in Workspace UI Action.
What is the other method to make it work in workspace?
2 REPLIES 2
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 08:54 PM
Hi sarasf,
Check this QA: https://www.servicenow.com/community/developer-forum/client-script-not-working-in-agent-workspace/m-...
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-19-2025 10:07 PM
yes it doesn't work.
use this and it works in both
g_user.userName
If my response helped please mark it correct and close the thread so that it benefits future readers.
Regards,
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader