Sending a notification with a Background Script

Jonatan4
Giga Guru

I'm trying to send a notification via a Background Script but nothing happens.
Does anyone know how to do it?

The script:

var gr = new GlideRecord('incident');
gr.get('2d833bd9db312300ad8a2fb7489619c5'); // sys_id of the incident

gs.eventQueue('incident.commented', gr);

1 ACCEPTED SOLUTION

Calvaresi E_
Giga Expert

Hi Jonatan,

talking about notifications fired by an event, the problem could be anywhere.

The script posted looks fine, you can check the sysevent table if the event is correctly triggered.

Other checks you can do:

- in incident.commented event, set the correct table (incident)

- in the notification, set a recipient that can receive email and preview it using an existing record

Let me know if it helps.

View solution in original post

2 REPLIES 2

Calvaresi E_
Giga Expert

Hi Jonatan,

talking about notifications fired by an event, the problem could be anywhere.

The script posted looks fine, you can check the sysevent table if the event is correctly triggered.

Other checks you can do:

- in incident.commented event, set the correct table (incident)

- in the notification, set a recipient that can receive email and preview it using an existing record

Let me know if it helps.

Thanks, that helped!

I did check the OOB notification and there wasn't a receiver in any field