Which approach is best getReference or GlideAjax?

a41022639
Tera Contributor

Hello Community,

 

I want to know whether getReference is good approach or GlideAjax and why?

4 ACCEPTED SOLUTIONS

Sandeep Rajput
Tera Patron
Tera Patron

@a41022639 GlideAjax is any day better than getReference as GlideAjax offers a lot of flexibility than getReference and GlideAjax is also more performant than getReference. Refer to this https://grow.usecoda.com/avoid-using-gform-getreference to know why getReference should be avoided.

View solution in original post

Abhishek_Thakur
Mega Sage

Hello @a41022639 ,

 

Both helps you to bring the server-side data to client side, but the most preferred way to do it with the help of GlideAjax instead of getRefference, just because getRefference might lead to the performance issue because it searches for every field in the form whereas GlideAjax is gives you the exact value without taking too much time because it directly focuses on requested field data.

View solution in original post

Abhishek_Thakur
Mega Sage

If you face any difficulty while writing the code, you can reach out to me.

View solution in original post

Anurag Tripathi
Mega Patron
Mega Patron

GlideAjax is always better. With callback of course.

 

Main difference would be that Get Refence will bring the whole object but using GlideAjax you can decide what you need to send form server to Client, so its more lightweight and potentially quicker.

-Anurag

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@a41022639 GlideAjax is any day better than getReference as GlideAjax offers a lot of flexibility than getReference and GlideAjax is also more performant than getReference. Refer to this https://grow.usecoda.com/avoid-using-gform-getreference to know why getReference should be avoided.

Abhishek_Thakur
Mega Sage

Hello @a41022639 ,

 

Both helps you to bring the server-side data to client side, but the most preferred way to do it with the help of GlideAjax instead of getRefference, just because getRefference might lead to the performance issue because it searches for every field in the form whereas GlideAjax is gives you the exact value without taking too much time because it directly focuses on requested field data.

Abhishek_Thakur
Mega Sage

If you face any difficulty while writing the code, you can reach out to me.

Anurag Tripathi
Mega Patron
Mega Patron

GlideAjax is always better. With callback of course.

 

Main difference would be that Get Refence will bring the whole object but using GlideAjax you can decide what you need to send form server to Client, so its more lightweight and potentially quicker.

-Anurag