gs.getUser().getFullName() always returning 'system ' user in script actions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 06:40 AM
I tried simple script statement in demo instance and same thing happening in our instance also
Script action:
event: session.established
gs.log('login user name'+gs.getUser().getFullName());//this is always returning 'system'---> for any user login
Please let me know how to write a script statement to get the current user login when session is established
- Labels:
-
Integrations
-
User Interface (UI)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 06:43 AM
check this
similar problem addresed
Why gs.getUserDisplayName() or gs.getUser().getFullName() returning 'System' as the username
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 06:48 AM
Thanks Anurag,
But here i am using events in script actions, although i am getting 'system' user
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 07:02 AM
yes Shravan,
but teh problem is...event is initiated by the system, so the actor there changes and when you do gs.getUser() it refers to the system(as it is firing the event). did you understand the problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-25-2015 07:08 AM
here also pass the user details in parameters only and try to access them in scripts like this
event.parm1
event.parm2
Or try to use "event.user_id"