- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:10 AM
Hello,
I have a very simple work flow in which I have to use currently logged in user's email address. How can I get this?
Thanks,
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:14 AM
Hi Raj,
var myUserObject = gs.getUser();
myUserObject.getEmail() -- returns the email address of the current user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:44 AM
Thank you Ganesh.
Right on dot. Your answer is also correct.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:31 AM
Hi Rajankumar,
Following script can be used:
var loggedInUserEmail = gs.getUser().getEmail();
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
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-03-2017 01:45 AM
Thank you Ankur,
Right on dot. Your answer is also correct.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2021 05:08 AM
Hi Rajankumar
you can write before Business rule for getting current user EmailID
(function executeRule(current, previous /*null when async*/) {
gs.addInfoMessage('test');
current.u_email=gs.getUser().email;
})(current, previous);
mark helpful/correct if it is helpful
Thank you
Vijay Kumar S

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-05-2021 05:09 AM
Hi Rajankumar
you can write before Business rule for getting current user EmailID
(function executeRule(current, previous /*null when async*/) {
gs.addInfoMessage('test');
current.u_email=gs.getUser().email;
})(current, previous);
mark helpful/correct if it is helpful
Thank you
Vijay Kumar S