Stop creating incident through email if more records found
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-02-2024 06:55 AM
Hi All,
We have a requirement that, update incident create inbound action to search for email from this sender received in the last 4 hours with target table of incident. if more then 20 found, do not create record and do not allow to continue processing other inbound actions
How can I achieve this one.
Any help would be appreciated. Thanks in Advance.
#inbound #script include
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2024 10:34 AM
Hi @siva14 ,
In that case let's try using current.setAbortAction(true) in the if condition and remove the below statements :
Please mark this answer as "helpful" and mark it as "correct" If you feel this helped you in anyway.
Thanks and Regards,
K. Sai Charan
Sr. ServiceNow Developer
Deloitte India
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 10:39 AM
Now i am facing another issue
the 4 hour part of the query was not working so i updated it with a new encoded query but the user_id != email.origemail.
email.origemail returns the email which user_id is looking for a sys_id.
i also, updated that user_id query to look for the specific sys_id of my tests but the processing did not stop and an INC was created.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 10:52 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2024 11:19 AM - edited 10-17-2024 11:19 AM
PFB script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-21-2024 05:43 AM
Hi @Sai_Charan_K , Any update on this, "email.origemail" is not working, is there any other query we can use for that, Any help would be appreciated.