Can one mailscript call another mail script

feco
Kilo Contributor

In notification email scripts, can it call another email script?

1 ACCEPTED SOLUTION

Brad Tilton
ServiceNow Employee
ServiceNow Employee

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.


View solution in original post

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

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.


feco
Kilo Contributor

Do you have a sample on how to call a script include from an email script and passing a variable?  


Brad Tilton
ServiceNow Employee
ServiceNow Employee

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