top of page
Writer's picturesajan Allan Roy R

Heard of "scheduled" gs.eventQueue?

Updated: Jun 10, 2021

Just when you thought gs.eventQueue() is a marvel in ServiceNow, how happy would you get when you know you can schedule it to trigger an event when u want?


Just pass the record parameter, parm1 and parm2, and then the time value as an object, to the gs.eventQueueScheduled() function.

gs.eventQueueScheduled('eventName', gr/current, 'parm1', 'parm2', timeObject)

For instance, to close a ticket after 3 days from the time of update, we will do something like this:

var gdt = new GlideDateTime('sys_updated_on');
gdt.addDaysUTC(3);
gs.eventQueueScheduled('eventName', current, 'parm1', 'parm2', gdt);

144 views0 comments

Recent Posts

See All

Some Useful ServiceNow scripts

Set/generate a sys_id for a new record: setNewGuid() //generates a new sys_id for a new record setNewGuidValue("sys_id") //creates record...

Opmerkingen


bottom of page