Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Scoped App: Is there a way to call a global 'email script' in the scoped app?

Michael H
Giga Guru

Hi SN Community,

I need to send a 'notification' from a Scoped App which needs to be dynamic and hence use an 'email script' to determine what's to be included in the email.

There doesn't appear to be an option to create a new 'email script' via the app 'studio'. Is there a way to call the global email script in the scoped app?

 

 

Alternatively, if there's a way I could call the notification from Global in the Scoped App that might work too?

Regards,

- Mike

1 ACCEPTED SOLUTION

SanjivMeher
Mega Patron
Mega Patron

I think you can create a email script from the navigation menu. You dont need everything to be created from studio. I also believe you can call global email scripts from scoped notification, but i would suggest creating them in scoped app.


Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

4 REPLIES 4

SanjivMeher
Mega Patron
Mega Patron

I think you can create a email script from the navigation menu. You dont need everything to be created from studio. I also believe you can call global email scripts from scoped notification, but i would suggest creating them in scoped app.


Please mark this response as correct or helpful if it assisted you with your question.

Thanks Sanjiv, 

It looks like you're correct that you can call global email scripts form the scoped notification.

The issue ended up being that the existing email script was trying to reference a field in the scoped app that it couldn't reach.

Your suggestion of creating a new 'scoped email script' via the navigation menu worked a charm.

Cheers,

- Mike

Hey thanks very helpful!

Tony Chatfield1
Kilo Patron

Hi, perhaps you could just trigger a sysevent via eventQueue and pass the current object in it, or pass in an array of the details you need in your message and then decode it in a global mail_script?