How do you call a script include from an inbound action condition?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-15-2019 06:11 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-15-2019 06:15 AM
Hello,
Can you please remove the space in javascript:global and check.
Regards,
Monika
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-15-2019 06:25 AM
Hi Monika,
I have removed the space but it still will not start my script include.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-15-2019 06:32 AM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
ā07-15-2019 06:36 AM
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