- 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
‎05-15-2019 10:33 PM
Hi ,
where we have to write these script please tell me?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-19-2019 12:55 AM
Hi preddy,
You have to create a scheduled job and run it as per your requirement .
Copy and paste the below code in Scheduled job .
create a email notification when event is fired .
It will send out if any user end date is with in the Time interval 3,7,15,30 days.
Thanks
NR
Click on Helpful if you are satisfied with my answer .