- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-08-2019 08:47 AM
Hi Archana ,
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 )
--------------------------------
created Scheduled job , event , notifications .
I have executed the scheduled job , but no results .
Tried with your script , but not working .
we have declared end date in variable .
"ob_contctrs_voul_interns_end_date" is the variable value.
-----------------------------------------------------------------------------------------------------
var ED = new GlideRecord('sc_req_item');
ED.query();
while(ED.next())
{
var exp = new GlideDateTime(ED.variables.ob_contctrs_voul_interns_end_date).getDate();
if(exp.addDaysUTC(-3)==new GlideDateTime().getDate())
{
gs.eventQueue('Alert check',ED,gs.getUser());
}
}
---------------------------------------------------------------------------------------------------------
Can you please provide solution for this .
Thanks
NR.