- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 11:34 AM
Good afternoon people,
I am trying to generate a scheduled notification where only the email would be triggered when the date was equal to the date included in a record field.
Example: A notification when the user is birthday.
Is it possible to create a notification like the example above?
Thank you.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 12:57 PM
Hello Felipe
Try something like this
1. system policy> events> registry
Event name: user_birthday
2. System definition>Scheduled jobs
Run: Daily
Script:
var date = "u_birthdayONToday@javascript:gs.daysAgoStart(0)@javascript:gs.daysAgoEnd(0)"; // get this encoded query depending on your field on user table
var gr = new GlideRecord('sys_user');
gr.addEncodedQuery(date);
gr.query();
while(gr.next())
{
//gs.log(gr.email ,'prateek_new');
gs.eventQueue("user_birthday",gr, gr.email);
}
3.System Notification>Email> notifications
Name: Your custom name
Table: sys_user
1.When to send
send when: event is fired
event name: user_birthday
2.Who will receive
event parm1 contains recipient: checked
send to event creator: checked
3. What it will contain
Depending on your requirement
Try this out and let me know the results
Please mark my response as correct and helpful if it helped solved your question.
-Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 08:45 AM
Hello Felipe
If we did answered your question, please mark the appropriate response as correct and close this thread. This helps community.
Please mark my response as correct and helpful if it helped solved your question.
-Thanks