- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
When we have certificate that will expire in 30, 60, 90 days, we need to set remainders.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @RadhaV
Try this:
1: Register the Event
- Navigate to System Policy > Events > Registry>Click New.
- Event name: record.expiry.reminder
- Table: Select your target table (like sc_req_item, alm_asset, custom_table_name).
- Description: Trigger for 90, 60, and 30 days before expiration.
2: Create the Email Notification
- Navigate to System Notification > Email > Notifications.>Click New.
- Table: Select the same target table.
- When to send: Select Event is fired.
- Event name: Choose record.expiry.reminder (created in Step 1).
- Who will receive: Select the users/groups (e.g., Assigned to, or Manager).
- What it contains: Draft your message (e.g., "This is a reminder that your record is expiring in [Event.parm1] days.").
3: Create the Scheduled Job (Scheduled Script Execution)
- Navigate to System Definition > Scheduled Jobs>New
- select Automatically run a script of your choice.
- Fill in the Name (e.g., Record Expiry 90/60/30 Day Reminders), set the interval to Period (1 Day),
var gr = new GlideRecord('your_custom_table_name'); // Replace with your target table
gr.addActiveQuery();
gr.addQuery('u_expiration_date', 'ISNOTEMPTY'); // Replace with your actual date field
gr.query();
while (gr.next()) {
var expDate = new GlideDateTime(gr.getValue('u_expiration_date'));
var today = new GlideDateTime();
var diff = gs.dateDiff(today.getDisplayValue(), expDate.getDisplayValue(), true);
var daysRemaining = Math.ceil(diff / 86400);
if (daysRemaining == 90 || daysRemaining == 60 || daysRemaining == 30) {
gs.eventQueue('record.expiry.reminder', gr, daysRemaining, gs.getUserID());
}
}
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 hours ago
@RadhaV You can create a scripted schedule job to fetch the certification expiration date and trigger the notification after every 30/60/90 days.
You can refer to this article https://nishacodeblogs.medium.com/send-notification-on-specific-day-date-in-servicenow-5d909d609f0b to take some inspiration.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
site is blocked.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
you can have event configured on your table along with notification
Then have daily scheduled job with sample script below, please enhance
sendEmail();
function sendEmail(){
try{
var gr = new GlideRecord('tableName');
gr.addQuery('Your Query');
gr.query();
while(gr.next()){
var gdt = new GlideDateTime(gr.dateField);
var nowTime = new GlideDateTime();
var duration = GlideDateTime.subtract(gdt, nowTime);
var days = duration.getDayPart();
if(days == 30 || days == 60 || days == 90){
gs.eventQueue("eventName", gr, gr.assigned_to.toString());
}
}
}
catch(ex){
gs.info('Exception'+ex);
}
}
💡 If my response helped, please mark it as correct ✅ and close the thread 🔒— this helps future readers find the solution faster! 🙏
Ankur
✨ Certified Technical Architect || ✨ 10x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 hours ago
Hi @RadhaV
Try this:
1: Register the Event
- Navigate to System Policy > Events > Registry>Click New.
- Event name: record.expiry.reminder
- Table: Select your target table (like sc_req_item, alm_asset, custom_table_name).
- Description: Trigger for 90, 60, and 30 days before expiration.
2: Create the Email Notification
- Navigate to System Notification > Email > Notifications.>Click New.
- Table: Select the same target table.
- When to send: Select Event is fired.
- Event name: Choose record.expiry.reminder (created in Step 1).
- Who will receive: Select the users/groups (e.g., Assigned to, or Manager).
- What it contains: Draft your message (e.g., "This is a reminder that your record is expiring in [Event.parm1] days.").
3: Create the Scheduled Job (Scheduled Script Execution)
- Navigate to System Definition > Scheduled Jobs>New
- select Automatically run a script of your choice.
- Fill in the Name (e.g., Record Expiry 90/60/30 Day Reminders), set the interval to Period (1 Day),
var gr = new GlideRecord('your_custom_table_name'); // Replace with your target table
gr.addActiveQuery();
gr.addQuery('u_expiration_date', 'ISNOTEMPTY'); // Replace with your actual date field
gr.query();
while (gr.next()) {
var expDate = new GlideDateTime(gr.getValue('u_expiration_date'));
var today = new GlideDateTime();
var diff = gs.dateDiff(today.getDisplayValue(), expDate.getDisplayValue(), true);
var daysRemaining = Math.ceil(diff / 86400);
if (daysRemaining == 90 || daysRemaining == 60 || daysRemaining == 30) {
gs.eventQueue('record.expiry.reminder', gr, daysRemaining, gs.getUserID());
}
}
Regards
Tanushree Maiti
ServiceNow Technical Architect
LinkedIn: https://www.linkedin.com/in/tanushreemaiti