Is It a best Practise to use Glide Record in client script or not?

Sagar_pawar
Tera Contributor

Hello All ,

I have used glide record  to popup  details of table in client script 

when we select caller then email of caller ,company name value  appear on respective caller and company field.

Thank You.

  

1 ACCEPTED SOLUTION

Pavankumar_1
Mega Patron

Hi @Sagar_pawar ,

 GlideRecord is not recommended on Client script.

GlideRecord is server side API if you want go get some data or validate from the server use GlideAjax API.

Refer below link to understand the GlideAjax API in client script.

https://developer.servicenow.com/print_page.do?release=quebec&category=null&identifier=c_GlideAjaxAP...

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

View solution in original post

6 REPLIES 6

jaheerhattiwale
Mega Sage
Mega Sage

@Sagar_pawar Its not best practice to use GlideRecord in client script. Instead you can use GlideAjax.

 

GlideAjax doc link: https://docs.servicenow.com/en-US/bundle/tokyo-application-development/page/script/ajax/topic/p_AJAX...

 

Please mark as correct answer if this solves your issue.

Please mark the answer as correct or helpful based on impact
ServiceNow Community Rising Star, Class of 2023

Harshal Sirsat
Tera Guru

Hi Abhi,
Its not best practice,
The client side GlideRecord object is often inefficient, because it returns lots of unnecessary data.
pls reffer this link

 

https://www.servicenow.com/community/developer-forum/using-glide-record-in-client-script/m-p/1450364....

Please mark as correct answer if this solves your issue.

 

 

 

 

ServiceNow10sun
Giga Guru

Use Script Include.

Pavankumar_1
Mega Patron

Hi @Sagar_pawar ,

 GlideRecord is not recommended on Client script.

GlideRecord is server side API if you want go get some data or validate from the server use GlideAjax API.

Refer below link to understand the GlideAjax API in client script.

https://developer.servicenow.com/print_page.do?release=quebec&category=null&identifier=c_GlideAjaxAP...

 

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar