- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 08:19 AM
Is there some kind of hidden system property that holds a given instance's email address?
More than once, I have encountered situations that would have been easier if I didn't have to hard code the instance's email address.
I can certainly just build a little script include that would be able to pull it, but before I start, I figured I'd see if anyone knows of a way to pull the instance email address other than just querying the sys_email_account table.
To explain further, when building customization that are traveling from a Dev. instance through a Test instance, and eventually into Prod. It doesn't seem like modifying the hard coded instance email address is the best approach. So I want a way to hard code an 'instance email address pull'.
Much like how "gs.getProperty('glide.servlet.uri')" pulls the URI
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 08:28 AM
Not 100% sure about grabbing the exact email address, but you could do something like this:
var email = gs.getProperty('instance_name') + '@service-now.com';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 08:28 AM
Not 100% sure about grabbing the exact email address, but you could do something like this:
var email = gs.getProperty('instance_name') + '@service-now.com';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-27-2017 08:33 AM
Ha. Brilliant. Thanks Matthew.
I can't believe I've gone this long without knowing that 'instance_name' is an available property.