- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:55 PM
Pretty much what the title says, I've been coding in client script and I have used GlideRecord, now I do get a warning that I shouldn't, so I was just wondering why I cannot use GlideRecord since I'm getting an error message.
Last case scenario I switch to using GlideAjax.
What is the best practice here?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 02:25 PM - edited 10-17-2023 02:26 PM
Hello @Stefan Petkovic ,
The client script present in the UI Page is similar to the Client Script present in widgets and standard client scripts (on change, on submit, etc.)
This means that they are scripts that run in the browser with some ServiceNow Client APIs, such as g_form, Glide Ajax, g_user, etc.
This means that we cannot use GlideRecordSecure because it is a ServiceNow API Server, so the best practice is to use Glide Ajax to get the data from the Server
If my answer helped you, please mark my answer as helpful.
Vanderlei Catione Junior | LinkedIn
Senior ServicePortal Developer / TechLead at The Cloud People
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 02:25 PM - edited 10-17-2023 02:26 PM
Hello @Stefan Petkovic ,
The client script present in the UI Page is similar to the Client Script present in widgets and standard client scripts (on change, on submit, etc.)
This means that they are scripts that run in the browser with some ServiceNow Client APIs, such as g_form, Glide Ajax, g_user, etc.
This means that we cannot use GlideRecordSecure because it is a ServiceNow API Server, so the best practice is to use Glide Ajax to get the data from the Server
If my answer helped you, please mark my answer as helpful.
Vanderlei Catione Junior | LinkedIn
Senior ServicePortal Developer / TechLead at The Cloud People