Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

inbound email action

shivaadapa
Tera Expert

Hi

How can i use stop processing in script part.

8 REPLIES 8

Appanna M
Tera Guru

Hello @shivaadapa ,

Try the below code.

event.state="stop_processing";
Please follow:https://www.servicenow.com/community/developer-forum/how-to-prevent-an-inbound-email-action-from-pro...

 

Please Mark my Answer as Helpful, if you find this article helpful or resolves your issue.

Hi @Appanna M 

it is not working in my script.

Hello @shivaadapa 

Can you share the script here?

Hi @Appanna M 

(function runAction( /*GlideRecord*/ current, /*GlideRecord*/ event, /*EmailWrapper*/ email, /*ScopedEmailLogger*/ logger, /*EmailClassifier*/ classifier) {

    var status = new global.RecordCreation().parseEmail(email, current.getTableName());
     if (status == true) {
        event.state = "stop_processing";
     }

})(current, event, email, logger, classifier);