DIfference between the GLideAjax and the g_scratchpad. Need an explaination with a use case will be helpful. ANy kind of help will be appreciated.

SrinivasPkl
Tera Contributor

DIfference between the GLideAjax and the g_scratchpad. Need an explaination with a use case will be helpful. ANy kind of help will be appreciated. Please explain the major difference in functionality wise to have a better understanding.

6 REPLIES 6

Deepak Ingale1
Mega Sage

1) GlideAjax is a call iniitiate from client side to server, it can be done via Client Scripts or UI scripts or UI policies etc which are client side running code.

2) g_scratchpad is the global variable made available to client side via display business rule which runs the Sever side. Whenever the form is being loaded, the g_scratpad variable is made available to client side

https://docs.servicenow.com/bundle/geneva-servicenow-platform/page/script/server_scripting/reference/r_GlideAjax.html

https://servicenowgems.com/2016/10/10/understanding-scratchpad-g_scratchpad/

Devyani_6
Mega Guru

Hi,

Go through the below link, it explain the difference between Glide Ajax and the g_scratchpad along with an example(scroll little down).

Mark Correct/Helpful, if this helps you.

Regards,

Devyani

Devyani_6
Mega Guru

Hi,

Go through the below link, it explain the difference between Glide Ajax and the g_scratchpad along with an example(scroll little down).

http://studysnow.com/servicenow/

Mark Correct/Helpful, if this helps you.

Regards,

Devyani

 

Santosh_Ksagar
Mega Sage
Mega Sage

GlideAjax:- The GlideAjax class allows the execution of server-side code from the client. GlideAjax calls pass parameters to the script includes, and, using naming conventions, allows the use of these parameters.

https://docs.servicenow.com/bundle/london-application-development/page/script/ajax/topic/p_AJAX.html

https://snprotips.com/blog/2016/2/6/gliderecord-client-side-vs-server-side

 

g_scratchpad: - The g_scratchpad object passes information from the server to the client, such as when the client requires information not available on the form.

https://servicenowgems.com/2016/10/10/understanding-scratchpad-g_scratchpad/

https://community.servicenow.com/community?id=community_question&sys_id=7971cb29db98dbc01dcaf3231f96...

Regards

Santosh Kshirsagar