Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Display URL link on form

tsam
Kilo Explorer

Hi -

Does anyone know if there is a way to display the URL of a form as a link on the open record? This is similar to the Copy URL option that is currently available on forms. I want to be able to display the URL link on the form instead of copying the link on the form.

Any ideas will be very much approciated.

Thanks.

9 REPLIES 9

CapaJC
ServiceNow Employee
ServiceNow Employee

Create a new URL field, add it to your form, Personalize Dictionary on that field, check the "Calculated" checkbox, and put the following in the "Calculation" field:



javascript:"https://demonightlyus.service-now.com/nav_to.do?uri=" + current.getLink(true)


Replace "demonightlyus" with your instance.


tsam
Kilo Explorer

Thank you so much. It worked perfectly!! 🙂


Here's a variation on the link syntax that gets you the shorter permalink format. I prefer this to opening the articles in the full application frame:

javascript:"https://usfdev.service-now.com/kb_view.do?sysparm_article="+ current.number

Jim


Hi,



I have almost the same issue unresolved:


And what if I wanted as a href not a https address, but an path (\\dhaksdhak\sjdfjk\shared_files) to an internal server?


How could it be managed?



Skender