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

PavanK960672992
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...

 

View solution in original post

6 REPLIES 6

jaheerhattiwale
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.

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.

PavanK960672992
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...