Unable to retrieve property value using gs.getProperty('') in scheduled report (sysauto_report)

pavan_yadav
Tera Contributor

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.

1 ACCEPTED SOLUTION

Ankur Bawiskar
Tera Patron
Tera Patron

@pavan_yadav 

I believe it has something to do with the sandboxing.

Check this link which talks the same which all classes are not allowed

Script sandbox property

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

31 REPLIES 31

Pranesh072
Mega Sage
Mega Sage

On which field you are adding this code?

 

In sysauto_report table we have condition field, it is script field, there I'm trying to call one schedule record (cmn_schedule) to restrict sending notification after 6pm.

Mark Manders
Mega Patron

Where/why are you calling a system property? What is the config you are trying to collect from the property?


Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark

In sysauto_report table we have field called condition, it is script field, there I'm trying to take cmn_schedule record to restrict sending notification after time out.