How do you call a script include from an inbound action condition?

e_wilber
Tera Guru

I have an extreremely simple script include that isn't being called in an inbound action:

function checkEmail(txt) {
gs.log('Check Email: started: ' + txt + ' :::: ' + current.body_text);

return false;
}

It is client callable and available for all scopes.

For the inbound email condition, I am using Body Text contains javascript: global.checkEmail(email.body_text)

and after processing the email a few times, the test log never shows up in the script logs so I must not be calling it right. 

 

6 REPLIES 6

try with is instead of contains with below format

====

javascript:new ScriptInclude().functionname();

====

 

Regards,

Monika

User664605
Kilo Guru

Hi wilber,

Please go through the below link 

https://community.servicenow.com/community?id=community_question&sys_id=62b6cb65db1cdbc01dcaf3231f96...

 

Hope it helps

Thanks 

Sameekshya

Mark Correct if this solves your issue and also hit Like and Helpful if you find my response worthy based on the impact.