Create INC via URL with URL as a parameter

Sabrina10
Kilo Guru

I have a team that wants to create INCs via a URL.     We've got this part down fine:

https://<myinstance>.service-now.com/nav_to.do?uri=incident.do?sys_id=-1

but sometimes we want to pass a URL to the short_description or description field such as

https://<myinstance>.service-now.com/nav_to.do?uri=incident.do?sys_id=-1%26sysparm_query=short_description=http://google.com

This results in getting the Page cannot be found message as the system tries to navigate to the google.com page

find_real_file.png

Any ideas on how to escape the URL in the parameter being passed so that it doesn't try to navigate to the page?   (note the value that is being passed to the short_description/description can vary as the URL is built based on information on the web page the user is invoking the URL from (if that makes any sense))   🙂

Thanks

Sabrina

3 REPLIES 3

BALAJI40
Mega Sage

can you provide the script, how you are achieving this.


I have end users that are using SPLUNK and adding a link within that tool to open a new INC and pass field values from SPLUNK to the INC.   Sometimes it may include a URL, sometimes not.       When it includes a URL, we get the message above - when it doesn't include a URL, the INC form opens fine with all the fields populated as specified in the URL (as they are also passing other fields such as Impact and Urgency)



I'm not sure if I can get the script they are using (or if it will make a difference in the solution), since when I create the URL manually, the same thing happens.



Thanks.


Malaya
Giga Expert

https://<myinstance>.service-now.com/nav_to.do?uri=incident.do?sys_id=-1%26sysparm_query=short_description=http://google.com



instead use (remove http://):


https://<myinstance>.service-now.com/nav_to.do?uri=incident.do?sys_id=-1%26sysparm_query=short_description=google.com



Thanks,


Malaya