- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 02:08 AM
I'm trying to use var prop = gs.getProperty('some.property.name'); inside a scheduled report (sysauto_report), but the value of prop keeps returning undefined. Can anyone confirm if gs.getProperty() works in scheduled reports, or if there's a limitation in that context?
Thanks,
Pavan.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 03:42 AM
I believe it has something to do with the sandboxing.
Check this link which talks the same which all classes are not allowed
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 04:25 AM
@pavan_yadav FYI
I tried it in my PDI but I cannot get no logs at all, not undefined, but nothing....
Documentation:
/* If my response wasn’t a total disaster ↙️ ⭐ drop a Kudos or Accept as Solution ✅ ↘️ Cheers! */
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 05:07 AM
As Ankur mentioned this is due to script executes in sandbox and you don't have access to gs.getProperty() method.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2025 05:13 AM
Hello @Community Alums ,
Is there any document, please give me link,
i want to override that behaviour
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 02:19 AM
If it is for branding of the email, you can use email scripts. Those work in scheduled reports as well. And from there your can absolutely call properties.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-17-2025 02:23 AM
Hi @Mark Manders ,
Yes we can also use email scripts but in my case I need to apply this condition in SLA, this report schedule should send notification only 9am to 7pm, so I already declared timings in cmn_schedule table,
so in the schedule report I'm using GlideSchedule() and its method isInSchedule(), these 2 are helps to restrict schedule running between the time.