Adding external link to Module
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2011 11:25 AM
I have case where in the Module on left hand navigation needs to be pointing to external links(out of Service now) which will be dynamic based on different environments such as dev, uat ,prod. So in case of dev the module link should point to http://www.xyz.com in case of uat it should point to http://www.abc.com and similarly for prod. I tried with URL (from arguments) but this typically doesn't solve my problem as I cannot associate a javascript function call in it. Script (from argument) also doesn't work in this case as it renders a script as a script call instead of evaluating the function. Ideal scenario would be if I can associate a function within the arguments where I can decide which link to render based on current service now instance.
Any one has come across such scenario?
Thanks,
Dhananjay
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2011 07:01 PM
I have not come across this, but I'm also confused because this shouldn't be difficult.
First off, why does it need to be dynamic? Why can't you set it accordingly in the environments?
If it does need to be dynamic, you could do several things...
Create a function
Create a translation table associating links to the instance
Create properties
You should certainly be able to call a function and return a url as a string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-13-2011 07:38 PM
I posted "You should certainly be able to call a function and return a url as a string."
I take this back, it doesn't seem easy to do.
Is there a huge business driver to not manually update each instance?
If you want the URL contained in the frame you can simple create a new module using the URL (from Arguments:) option specifying the URL. If you want it in a new window you can use the same URL (from Arguments:) type with something like:
javascript:window.open("http://www.google.com/");
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-24-2024 02:26 AM
this works many thanks 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-14-2011 01:11 AM
Hi, have you thought about not doing this with the instance but rather have someting fix which the receiving webserver could redirect according to where the request came from? Might be easy to do...