- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2019 03:37 AM
Hi ,
I have a Requirement to send an email Notification to the Requester when the end date of Contractor is getting close .
In detail :
In On-boarding REQUEST form , we have ( Start date & end date ).
If the Employee type is Contractor then we should enter the End date which is Mandatory .
I have entered (start date = Jan 1 , 2019 )& (End Date is June 30 , 2019) while submitting an on boarding Request for user "XYZ"
Requester should get Email Notification that user ( "XYZ") account is coming up for expiration on May 30 , June 15 ( Nothing but 30 days & 15 Days before Expiration )
How can i achieve this ?
Require Inputs to proceed further .
Thanks
NR.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-15-2019 03:13 AM
Hi Naveen ,
Thanks for providing inputs , i made some changes to your script and Added some functions , its working correct .
PLease find the Below Code :
var newexp=gs.dateGenerate(SS.variables.End_date,'00:00:00'); // End_date is variable name
var gdt= new GlideDateTime(newexp);
var sjb= gs.dateGenerate(gs.now(),'00:00:00');
var gdt1= new GlideDateTime(sjb);
gdt1.addDays(30);
if(gdt.getDate().toString()==gdt1.getDate().toString())
{
//gs.log("RITM NUMBER IS " +SS.number);
gs.eventQueue('Alert check',SS,gs.getUser(),SS.variables.ob_hire_report_to);
gs.log("end count of RITM is " +SS.number);
}
}
}
THanks
NR

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-10-2019 05:29 AM
I think you'd have a scripted schedule job that runs every day, queries the table that holds the end date to check if there are any records with an end date that is 15 or 30 days away. You would fire an event for each of those and then send a notification based on the event.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2019 05:58 AM
Hi Brad ,
Apologies i was busy with some IMP work , so could not reply you .
I have created a scheduled Job , Event , Notification .
Please find the screen shots , let me know if any changes Required .
PLease correct if i am going wrong .
Thanks
NR
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2019 06:55 AM
Below link will help you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-08-2019 07:21 AM
Hi Shashi ,
Thanks for the Quick Response.
I will Try with the link you have shared ,will update you once done.
Thanks
NR