- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 06:50 AM
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 02:46 PM
@abbassi There are two issues with your client scripts.
1. g_form.getReference ('user'); getReference call without a callback function are not supported in Service Portal. For more information please refer to https://www.servicenow.com/community/developer-forum/g-form-getreference-is-not-working-in-service-p...
2. var userRecord = new GlideRecord("sys_user"); Synchronous GlideRecord queries in client script in Service portal are not supported. Please consider shifting your GlideRecord queries to a Script Include and call them via GlideAjax.
Hope this helps.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2024 02:01 PM - edited 05-26-2024 04:18 PM
I guess you don't see any of the suggested 'alert()' results. I suggest that you provide additional details on the client script definition - screen shot. so Community members can see the table and field name.
Sandeep makes good points, see:
service-portal client-script-reference.html

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-24-2024 02:46 PM
@abbassi There are two issues with your client scripts.
1. g_form.getReference ('user'); getReference call without a callback function are not supported in Service Portal. For more information please refer to https://www.servicenow.com/community/developer-forum/g-form-getreference-is-not-working-in-service-p...
2. var userRecord = new GlideRecord("sys_user"); Synchronous GlideRecord queries in client script in Service portal are not supported. Please consider shifting your GlideRecord queries to a Script Include and call them via GlideAjax.
Hope this helps.