Why the Event is being fired but email notification not being created?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 06:58 AM
Hi!
I have a Scheduled Job that sends an event that triggers a notification. The scheduled job only has one line of code which is as an example: gs.eventQueue('Test', current);
The event was created with only the name and a description, the Queue and Table fields are empty. And then, the notification has no condition to be sent, only that it is sent when the event is fired (the name of the event is correct here, I alredy checked). The group of people in the 'Who will receive' tab have email. And the notification is active. When I run the schedule job it runs fine and the event is sent, the problem is that the notification is not sent. I tried looking at System log > Email but the notification doesn't even appear. What could it be? Thank you very much.
- Labels:
-
Scripting and Coding
-
Team Development

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 07:22 AM
Is the event showing as being processed? There is also a related list you can add to the event form called "Email Logs" and it will show you what messages the event generated.
Also did you make sure you declared current and use the same table that the notification is set to?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 08:17 AM
Yes, the state of the event is processed and in the event and in the notification I use the same table.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 07:22 AM
Hey Rocio,
just a few ideas:
1. Isn`t eventQueue usually called with at 4 parameters like: gs.eventQueue(event name, record, parm 1, parm 2)? Did you try with gs.eventQueue('Test', current, '', '') ? (We forget about the 5th optional parameter for the queue since it shouldn`t matter)
2. Also did you check for the users in their user record have "Notification" > "Enabled" set?
The field is OOTB hidden on the form by a Client Script "Hide notification field".
3. If you go into the notification > Preview Notification UI Action > Select "Existing event"
- can you pick one of your events you would expect to be there?
- are the Users struck through in red? If yes - hover over it with your cursor and SN should show the reason why they wouldn`t receive the notification
Maybe one of these help.
Cheers!
Martin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-09-2022 08:03 AM
also check if the 'Send to event creator' is true.
if it is on false validate who is the event creator (should be the run as on the scheduled job. Which defaults to the admin creating the job).