Call an event/notification in Scheduled Job

vimmykhurana
Kilo Contributor

Hi all ,

I need to trigger a notification for the records when their Implementation date is less than 11 months old .

I have created a Scheduled Job and provided the conditions.

Can anyone suggest how we can get the notification triggered in a Scheduled Job ?

Thanks,

Vimmy

1 ACCEPTED SOLUTION

BALAJI40
Mega Sage

First create a event and process that one with below sysmtax


Use the gs.eventQueue('eventname',object(generally table name),'parm1','parm2');


Please refer these links,


http://wiki.servicenow.com/index.php?title=Event_Registry#gsc.tab=0


http://wiki.servicenow.com/index.php?title=Events_and_Email_Notification#gsc.tab=0


View solution in original post

7 REPLIES 7

Yes you can taken as current as well. Its based on your requirement. If the event is triggers on same table you can give it as current object.



If you trigger the event on some other table (i mean your glide record on some other table) you need to pass the object of gliderecord table.


snehabinani26
Tera Guru

Hi Vimmy,



1.Create a event in Registry.


2. Go ahead with a schedule script execution.


Glide in to the table and addEncoded query as u_loan_return_dateRELATIVEEE@month@ago@11 // change this date field to yours.


3. fetch all the records and trigger the event by gs.eventQueue("event name",gr,"","");


4. Configure the notification in the same table.



Hope this helps you.


Kailash Bhange
Kilo Sage
Kilo Sage

Hi There,
I have Created Article to send Notification using Schedule Job, please take a moment to review and update feedback.

Notify using Scheduled JOBS in ServiceNow


https://community.servicenow.com/community?id=community_article&sys_id=1dd55f001b255010ada243f6fe4bcba8

If the article helps you, please mark it as Helpful, Bookmark it, subscribe it and your feedback would be much appreciated.


Thank You!
Regards,
Kailash