stop processing in inbound action

shivaadapa
Tera Expert

Hi
In script "event.state = "stop_processing"; is not working help me

(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);
3 REPLIES 3

SanjivMeher
Kilo Patron
Kilo Patron

Are you sure you are receiving the correct status value?

Can you also try

    if (status) {
        event.state = "stop_processing";
     }
 
or 
 
    if (status == "true") {
        event.state = "stop_processing";
     }
 

If it doesnt work, can you explain the complete use case?


Please mark this response as correct or helpful if it assisted you with your question.

Hi @SanjivMeher 

I created custom script to create incident for particular keywords but OOB create incident should not create record if custom one create record. OOB should work if custom does not match the keywords.

But in my system both inbound actions creating incidents even i use this "event.state = "stop_processing"; "
I am getting correct status.

did you make sure to set the order? You custom inbound should have the lower order than the create incident inbound action.


Please mark this response as correct or helpful if it assisted you with your question.