this post was submitted on 18 Jan 2024
2 points (100.0% liked)

ServiceNow

42 readers
1 users here now

founded 2 years ago
MODERATORS
2
submitted 11 months ago* (last edited 11 months ago) by kaotic to c/servicenow
 

Hoping for a little help here. I'm trying to use GlideEmailOutbound() to send an email. It works from the global scope, but I get the error com.glide.script.RhinoEcmaError: Cannot find function addRecipient in object when using it from my scoped application.

var mail = new GlideEmailOutbound();
mail.setSubject("Subject");
mail.addRecipient("[email protected]");
mail.setBody("Body");
mail.save();

Looks to me like the global scope has access to a different version than my scoped application. Is there a way to get access to the global version from within my scoped app?

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here