- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Hi all,
I would like to create a "Send email" action in a flow which contains a link to an Order Guide.
The problem is that the path is different in a test environment:
("https://test.service-now.com/now/etc...")
and a production environment:
"https://prod.service-now.com/now/etc...").
How can i create a URL in the test environment which can work in the production environment?
A variable or the like containing the "current" base URL.
Just the base URL must be different, the rest of the path is obviously fixed.
Thanks in advance
Solved! Go to Solution.
- Labels:
-
Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You don't need to hardcode the instance URL. A better approach is to use the glide.servlet.uri system property, which automatically returns the base URL of the current instance.
For example:
var url = gs.getProperty('glide.servlet.uri') + "now?id=sc_cat_item_guide&sys_id=<ORDER_GUIDE_SYS_ID>";
This way, when the flow is promoted from Test to Production, the URL will automatically point to the correct instance without requiring any changes.
If you're building the URL directly in Flow Designer and don't have access to scripting, check whether your release provides an Instance URL data pill. Otherwise, generating the URL using glide.servlet.uri is the standard and recommended approach.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You don't need to hardcode the instance URL. A better approach is to use the glide.servlet.uri system property, which automatically returns the base URL of the current instance.
For example:
var url = gs.getProperty('glide.servlet.uri') + "now?id=sc_cat_item_guide&sys_id=<ORDER_GUIDE_SYS_ID>";
This way, when the flow is promoted from Test to Production, the URL will automatically point to the correct instance without requiring any changes.
If you're building the URL directly in Flow Designer and don't have access to scripting, check whether your release provides an Instance URL data pill. Otherwise, generating the URL using glide.servlet.uri is the standard and recommended approach.