How to find the user record in user table with sys ID in Script Include from sysID retrieved from UI Action and retrieve other field values from User table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2022 09:23 PM
We have Contact field, we are getting contact details from the form in UI action and passing the sys ID to script include, but not able to find same record on user table and retrieve the other field for the same record from user table.
Not sure what's going wrong in below script. Please below script include and UI action
Thanks in Advance
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2022 10:53 PM
Hi,
so when you query sys_user with user sys_id the row count is 0?
Are you in some custom scope and trying to query sys_user?
Any error in system logs for cross scope?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-23-2022 11:03 PM
Yeh Ankur, I am in custom scope applications trying access sys_user table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 12:18 AM
Hi,
So any error in system logs for cross scope that you are not able to access sys_user table in query?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 12:36 AM
No errors in log, I am able to enter the table after glideRecord but not able to query the table with sys ID and there and then code is getting terminated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-24-2022 12:46 AM
Hi,
did you try to use try catch block to know the exception?
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader