what is GlideController()

emyrold
Giga Expert

I found that GlideController() is a packages call replacement -> Packages Call Replacement Script Objects - ServiceNow Wiki

However, I cannot seem to find much on what it is used for.

In the OOB inbound email action "Update Approval Request" around line 50 there is this block of code:

current.comments = "reply from: " + email.from + "\n\n" + email.body_text;

var controller = new GlideController();

controller.putGlobal("approvalSource", "email");

current.update();

controller.removeGlobal("approvalSource");

In this script I cannot see where "approvalSource" is coming from?  

Thanks,

-e

1 REPLY 1

michelhanna
Kilo Guru

Hi Erik,



The answer by tltoulson in this thread may give you an idea of GlideController which has access to the evaluateString function and another function called putGlobal, which puts a variable on the global context.


But I couldn't find any wiki or doc for GlideController.


Hope this helps.



Thanks,


Michel