- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 01:39 PM
We're trying to send email notifications using an event, but when testing it out we can't get email notification to trigger. Event triggers, but email isn't being delievered to 'requested for'.
Workflow Activity Script -
gs.eventQueue('sc_req_item.notify_ade_voice_rejection', '', '');
Under the Who Will Receive tab -
Users/Group in Fields is set to 'Requested For'
AND
We've tested it with Event Parm 1 and 2, only parm 1, only parm 2 and without either but same result.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 09:06 AM
This is where we landed, updated workflow activity with the following script and check boxed the parameter 2.
gs.eventQueue('event_name',current,current.number,gs.getUserName());
But still running into issues with some of the email notification not triggering after event has been successfully triggered. Each email notificaiton has its own event and workflow activity.
I've reached out to our ServiceNow resources within our company but they aren't able to locate the problem area. 3/5 aren't generating email notifications,
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-07-2023 06:02 PM
Please make sure that the email address of the "requested for" user is entered correctly in the workflow activity script and check that the workflow activity script is being executed when the event is triggered.
You can check this by setting a breakpoint in the workflow activity script and then triggering the event.
Please, don't forget to mark my answer as correct if it solves your issue or mark it as helpful if it is relevant for you!
Regards,
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 12:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2023 02:33 PM
You are missing the record: gs.eventQueue('sc_req_item.notify_ade_voice_rejection', current, '', '');
The eventQueue() method inserts an event in an event queue. The eventQueue() method is typically passed four parameters but can also take an optional 5th parameter:
- Event name. Enclose the event name in quotes.
- GlideRecord object, typically current but can be any GlideRecord object from the event's table.
- Any value that resolves to a string. This is known as parm1 (Parameter 1). Can be a string, variable that resolves to a string, or method that resolves to a string.
- Any value that resolves to a string. This is known as parm2 (Parameter 2). Can be a string, variable that resolves to a string, or method that resolves to a string.
- (Optional) Name of the queue to manage the event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-14-2023 09:06 AM
This is where we landed, updated workflow activity with the following script and check boxed the parameter 2.
gs.eventQueue('event_name',current,current.number,gs.getUserName());
But still running into issues with some of the email notification not triggering after event has been successfully triggered. Each email notificaiton has its own event and workflow activity.
I've reached out to our ServiceNow resources within our company but they aren't able to locate the problem area. 3/5 aren't generating email notifications,