How to configure the Inactivity notification for problem record
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 12:56 AM
How to configure the Inactivity notification for problem record
I have created Inactivity event
and Notification on problem
under who will receive - Assignment group of problem is working expected
I also want to send the same notification to the associated problem task analysts
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 01:04 AM
this article explains it well
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
04-11-2025 01:17 AM
Hi @Research,
Are you using an event based notification? if so:
- Ensure "Event parm 1 contains recipient" is checked on your notification
- Use the following script to gather the Problem task analyst:
var recipients = [];
// Get all associated Problem Tasks
var pt = new GlideRecord('problem_task');
pt.addQuery('problem_id', grProblem.sys_id); //Use your Problem Sys ID
pt.query();
while (pt.next()) {
if (pt.assigned_to) {
recipients.push(pt.assigned_to.toString());
}
}
gs.eventQueue('problem.inactivity', grProblem, recipients)
If you found this helpful, please hit the thumbs-up button and mark as correct. That helps others find their solutions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 11:00 PM
Hi @Medi C
Some where I am missing step please guide me
when to send
Event is fired
I selected "Event parm 1 contains recipient"
Email script
No luck please guide me
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-11-2025 11:10 PM
Hello @Research,
Please try to implement below solution if it works:
Since "Who will receive" in the Notification doesn't directly let you reference related task users in a list, you can use a Notification Script to add them.
🔹 Steps:
Open your Notification
Go to System Notification > Email > Notifications
Open the notification tied to your inactivity event on the Problem table.
Scroll to the "Who will receive" section
Leave the Assignment group entry as-is.
Click New to add a new recipient type.
Type: Script
This lets you add recipients via Glide scripting.
Add the script below to gather "Assigned to" users from all related Problem Tasks:
This script loops through all Problem Tasks linked to the current Problem, collects all unique assigned_to values, and adds them to the notification recipients.
Save the notification