Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

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";
}