- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2016 09:12 PM
I want the system to send email when contracts reach or over expiration condition , The email will notify everyone in group. For example , contract ends on 30/12/2017. For example , contract ends on 30/12/2017. Notification condition is 6 months before end date. So the system should send notification from 1/6/2017 ,1/7/2017, 1/8/2017.... until the contract is renewed or extended.
Now I used condition checks within 180 days and used "Contract Threshold breached" on notification
>> I want to email notification on the 1st date of each month (within 180 days) How I config this.
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2016 10:22 PM
Since you want to send email to each user whose contract will end.
so trigger event from the script and set the recipient in mail notification script from the value of event parm
http://wiki.servicenow.com/?title=Scripting_for_Email_Notifications#gsc.tab=0
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2016 10:44 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2016 10:53 PM
Change the querystring from code to actual query.
open user table in list view and apply the filter as per your requirement. Run the filter then copy the query from there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 12:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-02-2016 01:04 AM
use encoded query as string.
var strQuery = 'active=true';
gr.addEncodedQuery(strQuery);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2016 09:36 PM
Hello Sudaporn,
Run a Schedule script daily 00hours and check the day difference between contract expiry. if the difference is 180, 150,120,90... then fire the event.
Based on event, trigger the notification.
Hope it helps.
PS- please hit like or mark as helpful if helps.
Thanks
Prasun