From 7016646e7fc1de2b7b7409c60f78f424091aeb0b Mon Sep 17 00:00:00 2001 From: Shrikant Kulkarni <49854331+shridk@users.noreply.github.com> Date: Tue, 1 Oct 2024 15:59:28 +0530 Subject: [PATCH 1/2] Create script.js UI Action - Send Notification to assigned user Server Side Script --- UI Actions/Send Notification to assigned user/script.js | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 UI Actions/Send Notification to assigned user/script.js diff --git a/UI Actions/Send Notification to assigned user/script.js b/UI Actions/Send Notification to assigned user/script.js new file mode 100644 index 0000000000..103893ee2a --- /dev/null +++ b/UI Actions/Send Notification to assigned user/script.js @@ -0,0 +1,9 @@ +//Server Side Script to send notification to the assigned to user + +var gr_sys_email = new GlideRecord('sys_email'); +gr_sys_email.initialize(); +gr_sys_email.type = 'send-ready'; +gr_sys_email.subject = 'UI Action Notification from Incident ' + current.number; +gr_sys_email.recipients = current.assigned_to.email; +gr_sys_email.body = 'As the incident ' + current.number + ' is assigned to you, this UI Action Notification has been sent. Please review the incident.'; +gr_sys_email.insert(); From cf225b44c017285f44caaa61c7837498256834a0 Mon Sep 17 00:00:00 2001 From: Shrikant Kulkarni <49854331+shridk@users.noreply.github.com> Date: Tue, 1 Oct 2024 16:03:25 +0530 Subject: [PATCH 2/2] Create readme readme file --- UI Actions/Send Notification to assigned user/readme | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 UI Actions/Send Notification to assigned user/readme diff --git a/UI Actions/Send Notification to assigned user/readme b/UI Actions/Send Notification to assigned user/readme new file mode 100644 index 0000000000..22cb40588e --- /dev/null +++ b/UI Actions/Send Notification to assigned user/readme @@ -0,0 +1,6 @@ +UI Action - Send Notification to assigned user + +This UI Action adds a button that, when clicked, sends an email to the assigned user. +This is Server side script and creates a record in the table 'sys_email' with Email Body, Email Subject and Email Recipients. + +When clicked on the form button, it will send notification to the assigned to user.