How to redirect Link in prod ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2022 06:53 AM
Hi All,
In notification I had created link in that, I have give dev URL and migrate to prod . in production user click on the it redirecting to dev in ServiceNow. Every time I having chaining dev to prod in prod . There is any way while creating link in dev after migrating to prod Link should be redirect to prod .
Thanks ,
Suresh

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2022 06:59 AM
Hi there,
Can you share what you've setup?
Without knowing what you've setup, perhaps you used a full URL? Like:
https://your-instance.service-now.com/incident_list.do?sysparm_query=&sysparm_view=
You could just leave the instance URL of. This would be enough:
/incident_list.do?sysparm_query=&sysparm_view=
Or perhaps you scripted the URL? You could make it dynamic using:
If my answer helped you in any way, please then mark it as helpful.
Kind regards,
Mark
2020-2022 ServiceNow Community MVP
2020-2022 ServiceNow Developer MVP
---
LinkedIn
Community article, blog, video list
Kind regards,
Mark Roethof
Independent ServiceNow Consultant
10x ServiceNow MVP
---
~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2022 07:07 AM
Hi Mark,
While user rising the ticket , after completion of the ticket user get the notification .In that notification I'm send survey form link . In that link I have given dev environment Link ,for dev environment its working . After migrating dev to prod environment user clicking on that notification its redirecting to dev environment.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-21-2022 06:59 AM
Hi,
When building URLs that you want to use across multiple instances, it's best to follow guidance like in this URL: https://servicenowguru.com/scripting/business-rules-scripting/finding-instance-name-via-script/
For instance you can use:
var instanceURL = gs.getProperty('glide.servlet.uri');
and this would at least get the current instance name: https://instancename.servicenow.com -- and then you can build the rest of the URL from there.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!