Notification
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 06:54 AM
Hello Experts,
I want to send notifications 30,60 and 90 before the end date. can anyone please how can I achieve this?
Thank You.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 07:16 AM
you can use flow designer for this
- https://www.youtube.com/watch?v=hVctTUMWIcs
- https://www.youtube.com/watch?v=zsY0JyVBPz4
OR
you can use daily scheduled job for this; sample script below; enhance for your case
sendEmail();
function sendEmail(){
try{
var hrProfile = new GlideRecord('sn_hr_core_profile');
hrProfile.query();
while(hrProfile.next()){
var gdt = new GlideDateTime(hrProfile.employment_start_date);
var nowTime = new GlideDateTime();
var duration = GlideDateTime.subtract(gdt, nowTime);
var days = duration.getDayPart();
if(days == 30){
// event
}
else if(days == 60){
// event
}
else if(days == 90){
// event
}
}
}
catch(ex){
gs.info('Exception'+ex);
}
}
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 07:34 AM
Hi @Mark Wood
Flow designer is the right thing to use in this scenario.
Thanks and Regards,
Saurabh Gupta
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-17-2023 07:57 AM
Hi @Mark Wood
This is easily achievable via flow designer or scheduled jobs, but recommended is flow
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************