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.

Unable to use generateUrl function in Scoped Application

Debanjana
Tera Contributor

Hi,

I have a requirement to create a hyperlink to a word "here" in a email script. The notification email script is present in a scoped application and is being used across other notifications. 

I am using the below snippet, but however it is not creating the URL and throwing an error as "Function generateURL is not allowed in scope". Please help.

var url= '<a href="' + gs.getProperty("glide.servlet.uri") + gs.generateURL(gliderecordObject.getTableName(),gliderecordObject.sys_id) +'">+here+</a>'; 

 

PS: I am on a Kingston instance and the above snippet works on a Global Application Scope.

1 REPLY 1

Jace Benson
Mega Sage
Why not just construct the url st that point? var url= '+here+';