Get email, phone.... from current logged in user , does anybody know ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2013 05:18 AM
Hi all,
I spent some time to find how get data about logged in user and dont have luck.
I want get whatever exist on sys_user table from user record.
I can get it from form to state = current.assigned_to.email
But how do I get same info from logged in user ?
gs.getUser(); dont work for me
i tried gs.getUser().email; .......and not work
I need to use this in
Please help
Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-06-2015 07:20 AM
Mark Stanger wrote:
I'm glad the guru page helped. If you're getting user values server-side, there's a shortcut to all of the information that is explained there. Here's a code example for getting the user's title.
- //This script gets the user's title
- gs.getUser().getRecord().getValue('title');
//This script gets the user's title gs.getUser().getRecord().getValue('title');
I know this is an old thread but your answer helped me out! All i had to do was look in the sys_user table for the coulm names and it worked. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2013 10:43 AM
The method for getting the user data depends on where you're trying to get the user data from. You can use the SNGuru user object cheat sheet as a quick reference.
http://www.servicenowguru.com/scripting/user-object-cheat-sheet/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-07-2013 09:07 PM
Thanks a lot for this SN guru page. I like it!
Petr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-01-2017 05:31 AM
gs.print(gs.getUser().getEmail());