How to Notify Someone 1 Week Before End Date
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 11:35 AM
Is there a way to send out an email notification to the "Requested By" person on the External Vendor Access request for like a week before the end date is due? Just notifying that the access will be rescinded soon, giving the person a chance to change/extend the due date, if needed. A screenshot of the form I am talking about is attached.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 11:46 AM
Hi @msekla ,
Yes you can configure the timer and notification in workflow, timer will wait until due date based on end date and trigger the email notification.
You can configure event based notification or direct add that notification within the workflow.
-Thanks,
AshishKM
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 05:41 AM
@AshishKM Can you show me step by step of how would I do this because I tried it and it didn't work. Screenshot your final answer in order to attach it to your reply.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-21-2024 12:33 PM
you can add the timer / notification within the workflow.
Use the below code in timer for wait. here, end_date is catalog variable.
Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2024 11:54 AM - edited 03-13-2024 11:56 AM
Hi @msekla ,
Here is the sample scheduled job script: (Which will send an email notification 6 days before the date.)
var ceTasks = new GlideRecord('sn_hr_core_task');//update your table name
ceTasks.addEncodedQuery('//add your query');
ceTasks.query();
while (ceTasks.next()) {
var getEffStrDate = ceTasks.work_start_date; //get the date of your selected field
var effStrDate = new GlideDateTime(getEffStrDate);
effStrDate.addDaysLocalTime(-7);
var getDaysDate = effStrDate.getLocalDate();
var toDateTime = new GlideDateTime();
var toDate = toDateTime.getDate();
var compareDateTime = getDaysDate.compareTo(toDate); //Comparing both dates
if (compareDateTime == 0) {
gs.eventQueue('sn_hr_core.decison_7_days_global', ceTasks, ceTasks.assigned_to);//configure the event and add the notification
}
}
Configure the event with the name sn_hr_core.decison_7_days_global and select your table in event.
Create notification and select Event is fired.
Add required details from the event to the notification.
If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!
Thanks & Regards,
Sumanth Meda
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-18-2024 05:44 AM
Hi @msekla
I beleive this can be achieved without script.
There is "Wait Relative duration" action in flow designer which can be utilised for this requirement.
Kind Regards,
Ravi Chandra.