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

Monika2
Giga Guru

Hello,

Can you please remove the space in javascript:global and check.

 

Regards,

Monika

Hi Monika,


I have removed the space but it still will not start my script include.

Sorry for my last reply. Why are you calling script include in condition?

You want to invoke the script include through email inbound action. Right?

Please correct me if I am wrong.

 

Regards,

Monika

 

You can call the script include in the same way how we call it from any server side code.

PFB the syntax

====

var obj = new ScriptIncludeName();

obj.functionName();

====

 

Regards,

Monika