- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 07:31 AM
In notification email scripts, can it call another email script?
Solved! Go to Solution.
- Labels:
-
Scripting and Coding

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 07:40 AM
I don't think this is doable, but I think a better practice would be to put whatever code is in the 2nd mail script into a script include. That way you could call that script include from whichever mail scripts you need.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 07:40 AM
I don't think this is doable, but I think a better practice would be to put whatever code is in the 2nd mail script into a script include. That way you could call that script include from whichever mail scripts you need.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 07:49 AM
Do you have a sample on how to call a script include from an email script and passing a variable?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2016 08:19 AM
There isn't anything different you need to do from a mail script than any other server side code. Here's a good place to start with script includes.
Script Includes - ServiceNow Wiki