Glide Ajax is returning null value in UI script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 07:45 AM
Hello Guys,
i am calling script include from UI script , but i am getting null response ( alert line 10) , if you may say that issue in Script include but i have tested same si in on load script and it gave my response but UI script its giving null
UI Script :
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 08:53 AM
Hello Sandeep
Thanks for replying
initially i used g_user.userID only but same giving null value.
JUST FYI: when i impersonating with end user its giving me null value but for me its giving alert which is else condition .
is it bcoz g_user method does not worked in UI script for portal

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 09:58 AM
@Deepak89 I found this thread https://www.servicenow.com/community/developer-forum/getting-a-user-object-in-a-ui-script/m-p/169583... where responders gave some helpful suggestions to get user object on UI Script. Please see if this helps you.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 10:04 AM
@Deepak89 If you are unable to capture the logged in user via client script, can't you use gs.getUserID() on the server side?