- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 08:27 AM
All,
I have a field on the incident form
Name : 'Next Email'
Type - Date/Time
An E-mail should be sent as per the date and time selected in that field.
Is this possible.? If yes, Kindly help
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2018 08:52 PM
Mark,
eventQueueScheduled works to trigger an email on a particular date and time. Only when Next email is updated from empty to a new value, it triggers an event to be processed at the specified date and time.
I am not sure what is not working for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-30-2018 12:23 PM
Hi
the above answer is not working
Kindly help

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 09:01 AM
Hi Mark,
If you want the email to be sent when an incident is getting created/updated, follow the below:
Navigate to System Notifications --> Email --> Notifications
Create a notification as:
---------------------------------------------------------------------------
Check Inserted/Updated as per your requirement.
-----------------------------------------------------------------------------------------------
Select the users who need to receive this email.
---------------------------------------------------------------------------------------------------
Provide the subject and body of the email in What it will contain tab.
For more information, follow https://docs.servicenow.com/bundle/jakarta-servicenow-platform/page/administer/notification/concept/c_EmailNotifications.html
Mark the answer as Helpful if you find so.
Thanks,
Chappidi Archana

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 09:03 AM
If you want to trigger the notification even when the record is not inserted/updated, you have to create an event. Email triggers when this event gets fired.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 09:26 AM
Hi Archana,
The above mentioned method is working. However, it's sending an E-mail as soon as the form is updated.
My requirement is to send email at the selected time in the field.
Could this be done?
TIA

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-26-2018 09:37 AM
Yes, it can be done by using Scheduled Jobs.
Use the below script in Scheduled Job:
var gr = new GlideRecord('name_of_your_table');
gr.addQuery('u_next_email',new GlideDateTime());
gr.query();
if(gr.next())
{
gs.eventQueue('event_name',gr,gs.getUser());
}
You will have options to select when to Run this schedule Job in the Scheduled Jobs.
The above script sends the email to the logged in user and you will have to create a new event(event_name in this case).
Hope this helps.
Mark the answer as Correct/Helpful based on its impact.
Thanks,
Chappidi Archana