How to configure the Inactivity notification for problem record (xanadu version)

Research
Tera Guru

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

Research_0-1744650968961.png

 

some of the fileds depricated in who will receive / adding scripts
please guide me
Thanks in advance

1 ACCEPTED SOLUTION

Hello @Research ,

 

Thank you for the clarification, I understand the requirement now.

Please follow these steps:

 

1) Create a new Event Registry record. I have called it "problem_and_problem_task.inactivity" but feel free to pick any other name that is appropriate.

RobertH_0-1744656462614.png

 

2) Create a new Script Action as shown below. It will listen to the "problem.inactivity" event that got triggered by your Inactivity Monitor. It then triggers our special "problem_and_problem_task.inactivity" event, with the Problem Task assignees passed as the first parameter.

 

RobertH_1-1744656556378.png

 

Here is the script:

var grTask = new GlideRecord('problem_task'),
	assignees = [];
grTask.addQuery('problem', current.getUniqueValue());
grTask.addNotNullQuery('assigned_to');
grTask.query();
while (grTask.next()) {
	assignees.push(grTask.getValue('assigned_to'));
}
gs.eventQueue('problem_and_problem_task.inactivity', current, assignees.toString());

 

3.) Update your existing Notification:

  • change the Event to "problem_and_problem_task.inactivity"
  • enable the Event parm 1 contains recipient checkbox

RobertH_2-1744656820520.png

 

Now the notification will be sent to the Problem Assignment group and the Problem Task assignees.

 

Regards,

Robert

View solution in original post

9 REPLIES 9

@Robert H 
I also want to send same problem notification to problem task asigned to users

AmM01
Tera Contributor

Got you. It won't work this way.
You will need to create an event and a business rule that generates the list of users in an array. 

Research
Tera Guru

Sure Can you guide me with script
Thanks

AmM01
Tera Contributor

Sure, please check this article:
Setup email notification using Business rule. - ServiceNow Community
------------------

If my answer helped you out, show some love by hitting "Accept as Solution" and "Helpful"! 💡💬 Your support not only boosts the community vibe—it means the world to me too! 🙌

swapnali ombale
Kilo Sage

Hi @Research @ You should just have to dot-walk to the correct field. Your notification trigger should be on the problem task table, as should the email notification and template. In your notification record, you just need to populate the correct string into the 'User field' field. Assuming your problem task table is linked to the problem table with a field called 'u_problem', your 'User field' value should be 'u_problem.assigned_to'

Kindly mark my answer as helpful and accept solution if it helped you in anyway.