Send a reminder email before End date is due
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 04:05 AM
We have a request to create a field "xyz" to enter number of days in [ast_contract] table, this field will count how many days left to "End Date" field. then send a notification/reminder to "Manager" field.
Ex: a contract end date is "31/12/2028", i want to send a notification/reminder to the manager 6 months (or X months) before 31/12/2028. which means i would enter "182" (this is number of days ~6 months) in "xyz" field.
When current date is "01/07/2028" send a notification. (because it's 182 days left to End date).
Any help/suggestion would be helpful
Regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 04:14 AM
Glad to know that approach I shared worked.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-02-2025 04:15 AM
for that I already shared approach yesterday
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 04:26 AM
every contract requires reminder email with varying date?
Like Contract 1 is to be sent 180 days prior to End date, Contract 2 is to be sent 170 days prior to End Date
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2025 04:37 AM
Hi Ankur,
Yes every contract reminder is different than the other,,, 1 send a reminder 6 months before end date, other contract 3 months before end date, it depends on the field "xyz" in every contract.
this field can be number or date, whichever easier to achieve the request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-01-2025 01:57 AM
I will suggest to store number of days in that custom field as Integer for better date calculation
then you can use daily scheduled job
1) iterate over all the contracts
2) get contract end date and substract the days present in the custom field -> you will get a date
3) then compare today's date with that date from Step 2
4) if same then send email using gs.eventQueue()
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader