Notification

-ooo-
Tera Contributor

Hello Team,

 

I have one requirement where we created custom field named " Reviewer " ( which refers to sys_user table)  so my requirement is to trigger notification to reviewer whenever RCA type of PTASK is created we need to trigger the notification.

 

Please advise. 

1 ACCEPTED SOLUTION

Hi @-ooo- 

 

Simply create a notification in Problem Table without scripting (BR).

 

1. Condition Type = RCA

2. When to Send - Record is created or inserted. Check mark on Inserted

3. Whom to Send - From Users/Groups -> Reviewer (Field) Refer Snip Below

 

RohitSingh3_0-1740998472073.png

 

If my response helped, please mark it helpful and accept the solution so that it benefits future readers.

 

Regards,
Rohit

View solution in original post

10 REPLIES 10

_Gaurav
Kilo Sage

Hi @-ooo- 
You can create a notification on the problem table where the reviewer field is created and select the option 'Record is inserted' under when to send section and  you can select the field Reviewer under whom to send section and in the last section you can add the notification content.

 

Please mark this as helpful if this resolves your query.
Thanks

Rohit  Singh
Mega Sage

Hi @-ooo- ,

 

In which table Reviewer field is created?

 

Regards,

Rohit

Problem table

Nilesh Pol
Tera Guru

Hi @-ooo- 

Hi @-ooo- 

You create new Notification by System Notification > Email > Notifications.

select When to send: Record Inserted (or when the PTASK is created).

Recipients tab, select Users. Set the User field to your custom field Reviewer.

Set up Message and Subject as per requirement.

Finally, Create a After Insert Business Rule to Trigger the Notification onthe table where your PTASK records reside. You can add a condition in BR to check if the RCA type is selected.

Script:

(function executeRule(current, previous /*null when async*/) {
if (current.type == 'RCA') { 
var gr = new GlideRecord('sys_user');
if (gr.get(current.reviewer)) { 
var user = gr;
gs.eventQueue('notification.email', current, user.email, user.name);
}
}
})(current, previous);