
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 05:56 AM
Hello, I made a UI Action in order to create a notification in ServiceNow to basically generate an award and send it to the nominee of that award.
The code looks like this:
current.u_award_winner_notification_sention = true;
gs.eventQueue("wingsawardfire", current, gs.getUserID(), current.u_name);
current.update();
gs.addInfoMessage("Notification Email Sent")
But unfortunately it is not working... What am I doing wrong
What I would like it to do is, I made a checkbox on table XXXX, (which is where this UI action resides) I would like it to check the checkbox, then create a new event which triggers the new notifications (it is set to trigger by opening that event) then email the person in parm2 (current.u_name) with the award notification email, then show that the notification was sent.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 08:10 AM
No error... the event was created sorry i see it now in the event log:
No notification came to my inbox though... weird.
I just put nominee.email to see if that will work? I dunno. I'll let you know if that makes a difference

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 08:12 AM
No worries.
Do you have send to event creator checked in the notification?
Otherwise, you will not receive it, since you are creating the event.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 08:00 AM
Strange, looks just fine to me.
Can you try this, to find out what's going wrong:
try{
current.u_award_winner_notification_sention = true;
gs.eventQueue("wingsawardfire", current, gs.getUserID(), current.u_name);
current.update();
gs.addInfoMessage("Notification Email Sent")
}
catch(ex){
gs.addErrorMessage(ex)
}
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 08:10 AM
No error... the event was created sorry i see it now in the event log:
No notification came to my inbox though... weird.
I just put nominee.email to see if that will work? I dunno. I'll let you know if that makes a difference

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 08:12 AM
No worries.
Do you have send to event creator checked in the notification?
Otherwise, you will not receive it, since you are creating the event.
Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.