Gs object not working in client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-06-2015 11:42 PM
I am trying to use GS object in my client script but I am getting the error :-
'The object "gs" should not be used in client scripts'
How can I use gs in my script?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2015 12:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2022 06:09 PM
Cheat sheet helpful, thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2015 12:35 AM
If you are working with form fields on client script, you should use g_form.
As said by Anurag Gs is server side object and works for BR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2015 01:32 AM
Hi Naziya. As previously mentioned, g_user and g_form can get you most of the details you need, but if you absolutely can only use gs, then you'd need to write a script include and pass the gs value back to the client via Glide Ajax call.
Use the examples on the following page to help you get it working:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-07-2015 01:43 AM
Hi Adam.Thanks. I could not find on service-now wiki how or where to use gs but I think your answer will help.