- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-19-2022 06:57 AM
I am trying to send a notification to a user the replies to a closed incident. I've been reading a lot of threads and finally though I got it figured out, but the reply is not sending. Would love another set of eyes to see if they can spot what I might have done wrong?
I'm using an inbound email action, an event, and a notification.
Before I start, I also edited the "Update Incident (BP)" inbound action to prevent the inbound reply from adding a comment to the incident if it's closed by adding an if statement for gr.state != 7. The full code for that inbound action is below. However, in spite of this, the reply from the user is still added as a comment on the incident.
gs.include('validators');
if (current.getTableName() == "incident") {
var gr = current;
if (email.subject.toLowerCase().indexOf("please reopen") >= 0)
gr = new Incident().reopen(gr, email) || gr;
if (gr.state != 7) {
gr.comments = "reply from: " + email.origemail + "\n\n" + email.body_text;
}
if (gs.hasRole("itil")) {
if (email.body.assign != undefined)
gr.assigned_to = email.body.assign;
if (email.body.priority != undefined && isNumeric(email.body.priority))
gr.priority = email.body.priority;
}
gr.update();
}
I used this thread as a guide for the solution I am trying: https://community.servicenow.com/community?id=community_question&sys_id=c507f3c11be98098ada243f6fe4bcbd5
Inbound Email Action
Event
Notification
Solved! Go to Solution.
- Labels:
-
Scripting and Coding
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-24-2022 07:08 AM
The solution to my issue ended up being as simple as checking the "send to event creator" tickbox in the notification.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 05:03 AM
Hi Staxed,
I have same requirement and did all the mentioned steps of yours, but no luck.
Can you please help?
Thanks
Deepika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-26-2023 05:19 AM
All I did to solve my issue is stated in the solution post, I just checked the "send to event creator" checkbox in the notification. For more help than that you might want to create your own post with more details so people can provide specific responses to your issue.