What is use of getReference in client side.

niveditakumari
Mega Sage

Hi, 

 

What is use of getReference in client side. I know we can get data from server side to client side but we can get data with GlideAjax as well then what is use of getReference. 

Can anyone please make me understand for it. 

 

Regards, 

Nivedita

 

 

1 ACCEPTED SOLUTION

Pavankumar_1
Mega Patron

Hi @niveditakumari ,

The g_form.getReference() method requests the whole Record (one Object with all fields values) to the server. It may cause slowness to your Client Side action.

Many cases one or very few fields are necessary for us. So, instead of getReference we can use GlideAjax.

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

View solution in original post

5 REPLIES 5

Pavankumar_1
Mega Patron

Hi @niveditakumari ,

The g_form.getReference() method requests the whole Record (one Object with all fields values) to the server. It may cause slowness to your Client Side action.

Many cases one or very few fields are necessary for us. So, instead of getReference we can use GlideAjax.

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