- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2020 10:18 AM
Hi,
The Inbound Action - "Update Incident (BP)" is creating new incident upon reply.
Scenario tried/tested - I tried to reply to one of the closed Incident but noticed that a new Incident got created.
Below is the code and need help on the same:
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;
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();
}
Solved! Go to Solution.
- Labels:
-
Notifications

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2020 03:22 PM
Hi,
Are you sure this inbound action is the one doing this?
Can you check your email logs (you can type sys_email.list and press enter in left-hand navigation search, for example) and find the specific test email, once you've clicked the record, scroll down to the bottom and it'll tell you how the email was processed and what inbound action did so.
Example log:
OOB I don't believe this inbound action would create a new record as it's set to update match if found. If the email is tagged as a reply email and the inbound action didn't find a match, then it doesn't do anything.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2020 10:23 AM
Hi,
Can you make sure you do not have any condition passed additionally. Also, can you ensure that the email replied on has watermark (Msg that ServiceNow uses to consider it as reply & upate record is present once).

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2020 03:22 PM
Hi,
Are you sure this inbound action is the one doing this?
Can you check your email logs (you can type sys_email.list and press enter in left-hand navigation search, for example) and find the specific test email, once you've clicked the record, scroll down to the bottom and it'll tell you how the email was processed and what inbound action did so.
Example log:
OOB I don't believe this inbound action would create a new record as it's set to update match if found. If the email is tagged as a reply email and the inbound action didn't find a match, then it doesn't do anything.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 10:42 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-22-2020 01:15 PM
Hi,
If you don't mind, can you create another question so that we can track that conversation there? Feel free to link me to it here, but we'd love to keep the questions separate, if possible.
Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!