Skip to content

Commit 588aefc

Browse files
Notify Users on Specified Date (#1443)
* Create NotifyUsers.js * Create Readme.md * Update NotifyUsers.js * Update Readme.md
1 parent e3a5bcd commit 588aefc

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
// Trigger Business Rule that runs on Insert/Update
2+
3+
(function executeRule(current, previous /*null when async*/) {
4+
5+
// Add your code here
6+
7+
var gDT = new GlideDateTime(current.u_email_to_be_sent_for_date); // You can select your date field when an email needs to be sent out
8+
9+
gs.eventQueueScheduled('email_date', current, '', '', gDT); // Trigger an eventQueueScheduled method so that event can be triggered, the event can be created of your choice
10+
11+
})(current, previous);
12+
13+
// The event Name here is email_date, it can changed according to the needs
14+
15+
// Notification record will be created to generate a notification
16+
17+
When to Send - The event is triggered, in my case it is email_date
18+
Who will receive - Caller of an incident, you can select your recipients
19+
What it will contain - An Email body of your choice
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
This configuration will send an email on the specified date.
2+
3+
This will use a date field to trigger email notifications.
4+
5+
Business Rule will run on Insert/Update to trigger the event. As soon as the event is triggered, the notification will be in the queue to be triggered on the specified date field.

0 commit comments

Comments
 (0)