GlideRecord or GlideAjax?

Ravish Shetty
Tera Guru

In my previous organization where I started with ServiceNow we were advised to use GlideAjax in async mode on client side scripts instead of GlideRecord. GlideRecords too can work in async mode. So was this advise incorrect?

1 ACCEPTED SOLUTION

Depends what you are trying to achieve really.



aysnc client side gliderecord is is identical as far as I can tell as an async glideajax call (performance wise aswell ) as they both send the request and await the response with a callback function.



HOwever be careful with your queries, client side glide records adhere to ACLs whereas server side ACLs do not. So if the information is secure away from the user via an ACL, you'll need to use a glideajax call.


View solution in original post

17 REPLIES 17

Depends what you are trying to achieve really.



aysnc client side gliderecord is is identical as far as I can tell as an async glideajax call (performance wise aswell ) as they both send the request and await the response with a callback function.



HOwever be careful with your queries, client side glide records adhere to ACLs whereas server side ACLs do not. So if the information is secure away from the user via an ACL, you'll need to use a glideajax call.


Hi Ahmed,



I believe it was mostly considering the performance aspect. I did not know about the security aspect.


Thanks for sharing.



Regards,


Ravish


nayeem2
Giga Expert

Hi Ravio,



if you want to call GlideRecord in client scripts use GlideAjax to reduce perfomance issue.


Hello Nayeem,



As stated above, if you mean by how GlideAjax can be useful performance wise then i have stated that even GlideRecord can be used to perform async queries on client side.


Is there any other benefit for using GlideAjax?



Regards,


Ravish


Kalaiarasan Pus
Giga Sage

to start with, the thread was too long and I dint read it through .. so I might be saying what is already said...




it is always better to do glideajax instead of gliderecord for a simple fact that I have faced few issues where gliderecord get's conflicted by ACL's... since I had gliderecord's on my client script, it sometimes used to break for end users where they did have some conflicts with the ACL.... So i stopped using client side gliderecord's long back.....



i will not go in the debate of sync V/s Async , as both has its use case and we should be clever enough to apply 'what at where'