Dynamic glide.servlet.uri System Property

Brian Bush
Giga Guru

We use a reverse proxy with an internal URL as well as the standard external *.service-now.com URL. I would like the glide.servlet.uri (property used to generate permalinks) to be set to a dynamic value like this: javascript:location.href.substring(0, location.href.indexOf("?")); It doesn't work. Does anyone know of a way to force it to evaluate the javascript?

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi Brian,



As far as I know, properties are meant to be static values (hence the reason they are cached for performance reasons.) The only way to make this dynamic is to script it where ever the property is used. While this may be possible in some places (e.g. notifications or business rules) it's not always accessible to the customer.


View solution in original post

10 REPLIES 10

Our "Copy Permalink" is working correctly now for the internal URL.


How have you succeeded ? Did you defined a property "glide.servlet.uri"?


For our situation, in each Knowledge article, we needed to change the base URL that the permalink listed at the bottom pointed to. To fix this, I borrowed the one line from the "kb_article_footer" UI Macro that started with "var urlpath", dropped that into the "kb_view_common_footer_metadata_fields" UI Macro and called that instead. So it looked like:



copyToClipboard(urlpath);



instead of the original line of:



copyToClipboard('${permalink]');



and that fixed it. Hope this helps.


Hi trace,



I've found another solution : change the Business Rule ''Add Apps, URI, Suffix To Scratchpad'.



Replace the line 'g_scratchpad.servlet_uri = gs.getProperty('glide.servlet.uri')


with


g_scratchpad.servlet_uri = gs.getProperty('glide.servlet.uri.custom')



and define the property 'glide.servlet.uri.custom' to your custom URL



P.S. Define a property the 'glide.servlet.uri' don't work - I don't know why. It's seems that it is not a 'real' property


Hi Jean,



My requirement is to change the base url redirection to service portal, i.e. if anybody hits on abc.service-now.com/ then he should get redirected to SP login page i.e. abc.service-now.com/sp .



Please suggest what could be done to achieve the purpose.



Thanks


Lokesh