Instance name or base URL

psiek
Kilo Contributor

Hi,

I need to have base url our instance name, because , as we have 3 instances, we cannot hard code links. (I can't find a way to use ${URI} or ${URI+} in   blocs in templates)

Regards,

8 REPLIES 8

psiek
Kilo Contributor

(I can't find a way to use ${URI} or ${URI+} in blocs in templates)


psiek
Kilo Contributor

OK, got it : gs.getProperty("instance_name");


Mark Stanger
Giga Sage

You can also get the full instance URL by accessing the 'glide.servlet.uri' property. See here for details...

http://www.servicenowguru.com/scripting/business-rules-scripting/finding-instance-name-via-script/



mark.stanger



Better than ever ! thanks a lot

So my little function is now stretched to :

function CreateLinkForObject(strTableName, strSys_id)
{
return "LINK";
}