- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:05 AM
Hi All,
I am having some trouble with my script. I am creating a incident from a ticket but I need to update a work note to the ticket with details of the created incident (something like Incident # has been created)
I am using "Incident [code]<a href="incident_url" target="_blank">INC_number</a>[/code] has been created. But that does not seem to be working and not redirecting to incident.
Could someone please advise on what I may be missing?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:26 AM
@CJPeterson Update your worknote as follows.
current.work_notes = 'Incident [code]<a href="'+gs.getProperty('glide.servlet.uri')+'nav_to.do?uri=incident.do?sys_id='+sysID+'" target="_blank">INC_number</a>[/code] has been created.';
Hope this helps.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:14 AM
Hi there,
So what is "incident_url", I don't see that defined in your code.
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
02-29-2024 11:16 AM
Hi @CJPeterson ,
Shouldn't you be using URI / URI_REF here to get a link?
Something to read: Links to records in email notifications
Regards, Ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:17 AM
Hey @CJPeterson,
Am I missing something or are you not using the actual URL to the incident in the href attribute?
If so, try setting
..... href = "<your instance>/incident.do?sys_id=' + sysID + '" ....
Hope it helps, cheers

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-29-2024 11:26 AM
@CJPeterson Update your worknote as follows.
current.work_notes = 'Incident [code]<a href="'+gs.getProperty('glide.servlet.uri')+'nav_to.do?uri=incident.do?sys_id='+sysID+'" target="_blank">INC_number</a>[/code] has been created.';
Hope this helps.