Built something you're proud of? Tell the story. A quick G2 review of App Engine or Build Agent helps other developers see what's possible on ServiceNow. Share your experience.

popCurrent() and putCurrent()

naga91n
Tera Contributor

Can anyone help me understand what is the definition and usage of popCurrent(), putCurrent() functions.

2 REPLIES 2

corina
ServiceNow Employee

Hello Dinesh.



This doe snot seem documented.



However here:


Dynamic Iframe CMS


@gurpreet provided an input on this



and here


Application scope issue with putCurrent() and popCurrent()



also coryseering provided a valuable input.


sergiu_panaite
ServiceNow Employee

popCurrent() and putCurrent() are part of GlideRecord:



putCurrent() - puts a GlideRecord as the current global object


popCurrent() - removes the last occupant of the current global variable



Note: Each call to putCurrent should be followed by a popCurrent.