inbound email action
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2024 11:06 AM
Hi
How can i use stop processing in script part.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2024 12:32 PM
Hi @Appanna M
It's still creating duplicate record. it's not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-28-2024 08:02 AM
Can you tell me what is the type of the "status"? is it a boolean or string?
And also try adding a log statement inside if condition to test the event state results.
(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {
var status = new global.RecordCreation().parseEmail(email, current.getTableName());
gs.info("Status:"+status);
if (status == true) {
gs.info("Test");
event.state = "stop_processing";
}
//If the var status is string then you have to check the condition in quotes.
if(status == 'true');
})(current, event, email, logger, classifier);
Try and let me know the status.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2024 12:26 AM
Hi @Appanna M
status is returning Boolean.
if i use stop processing in the code it will work as like default stop processing field(OOB).
my requirement is that if my inbound action will not create any record means it should go for OOB create incident and if my inbound action create any record it should not go for other actions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-29-2024 12:35 AM
You need to add a system property "glide.hub.flow.inbound_email_trigger.show_advanced" to enable that option. Details here.
Also check KB Article
https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0779287
Please like or mark correct/Helpful based on the impact of the response.
Thanks & Regards,
Pushpanjali