gs.getUser
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 01:49 AM
After upgrade to helsinki we have issue in gs.getUser.getName() function. When we impersonate person with ITIL role function provide expected output. but when we logged in as user with but when we impersonate user with no role it give undefined.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 03:08 AM
Hi Hima,
Are you sure that you are not missing parentheses after 'getUser'? It should be 'gs.getUser().getName()'
Thanks
Abhinandan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 03:11 AM
Hi,
Try like this
var currentUser = gs.getUser();
gs.info(currentUser.getName());
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 03:13 AM
Hi Hima,
The code which has to execute might be placed somewhere ( any server side script). There might be condition in for the script to run. This condition might be the reason to make it run for only itil user. Please check the condition.
Thanks,
Ramya.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 05:00 AM
Hi,
Here is piece of my code . I am executing this on before query business rule.
var n=gs.getUser();
gs.log('user name'+ n.getName());
it is showing 'user name system' as log entry.