Troubles with Client Session data
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-23-2012 06:14 AM
Hi,
I can't get putClientData() and getClientData() to work for me for some reason.
http://wiki.service-now.com/index.php?title=Session_Client_Data
The Script Action is fired by 'session.established'.
It simply contains:
gs.getSession().putClientData('myValueThatWontWork','test1');
and then it is read by a Client Script in incident table.
function onLoad() { var l = g_user.getClientData('myValueThatWontWork'); jslog("testingGetSessionData: "+l); }
What is shown in the debug window is 'testingGetSessionData: undefined'.
What I'd want to use this for is storing the logged in users locations's parent region in client session data so I do not need to make a new server query for it everytime the incident form is loaded.
Also that 'Synchronous' mentioned in the wiki article is not in the list of available fields when personalizing the form.
Is that something long ago depcrecated and do I need to worry about it?
Thanks in advance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-09-2012 04:14 PM
Hello Jakko,
Unfortunately whats missing there is to activate the Synchronous option, without that you will keep getting the same error.
Check if you can personalize the form, otherwise you will need to ask that to be added to the form by SNC.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-10-2012 08:14 AM
I had similar issues a while ago in that the Synchronous option was not showing. This was as a result of an acl being enforced which prevented it from showing up in the slush busket - hence not being able to add to the form.
Off the top of my head I cant remember the acl needed.
Hope thats a good pointer for you though
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-11-2012 12:06 AM
It is a very good pointer as that field was limited to maint-role only. Thank you very much.
The question now is: What reasons there are for that field to be limited to maint-role only without admin override?
What unforeseen consequences could there be if I enabled it for me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-26-2013 01:34 AM
Hi Everybody,
"gs.getSession().putClientData('myValueThatWontWork','test1');" is not working for me as well.
Activation of Synchronous option I guess you are talking about on Script Action for event 'session.establish'
I've checked that. In my case it is activated. Still this problem persist.
Also if I check error log I'm getting below error
" Illegal access to method putClientData(string,string) in class com.glide.sys.GlideSession"
Any help will be highly appreciated
Thanks