- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2020 07:50 PM
Hi,
I want to return the User ID (user_name) of the current user information on Record Producer.
However, the name is returned.(Default Value)
javascript: var user = new GlideRecord('sys_user'); user.get(gs.getUserID()); user.user_name;
So here is my requirement to return "admin".
What should I do?
Thanks in advance,
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2020 08:08 PM
ootb display value gives user full name on reference variable.
you can create one custom variable (single line text type ) as user ID and there in default value pass
javascript: gs.getUserName()

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2020 08:08 PM
ootb display value gives user full name on reference variable.
you can create one custom variable (single line text type ) as user ID and there in default value pass
javascript: gs.getUserName()
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-11-2020 08:22 PM
Hi,
oh,I can't get it with the reference type.
understood.
Thank you ,Harshvardhan.
Regards,