- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:08 AM
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.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:42 AM
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
If my response helped, please mark it helpful and accept the solution so that it benefits future readers.
Regards,
Rohit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:12 AM - edited 03-03-2025 02:28 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:13 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:20 AM
Problem table
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 02:17 AM
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);