- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 06:54 AM
I have a business rule that calls a REST Service to create an Incident in another ServiceNow instance. Upon return I will have the newly created INC and INC sys_id.
I'm trying to set the url to that new INC in the u_incident_number field (type= url) and have the INC number displayed from within a related list.
I able to set the INC number, but the URL goes to the case table which is incorrect. How can I set the URL?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 10:31 AM
use something like this
var url="https://...........?uri=inicdent.do?sys_id="+parsedResponse.result.sys_id;
current.u_incident_number="<a href="+url+">"+parsedResponse.result.number+"</a>";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 11:18 AM
So is there no way via a URL field in regards to a list?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 11:31 AM
Sorry, I don't think there is a way.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 10:24 AM
So I have changed the way I'm doing this so that I can hopefully acheive the outcome of having the INC12355 as a link to view itself.
So within the business rule above I am now updating a field on the form (instead of the related list).
The value is there and if you right click and 'open new tab' it opens the url successfully.
Is there a way to remove the HTML editor and make the field so the users can't change the data?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:14 PM
Just create a UI policy and make the incident field as read only by adding a UI policy action . This will remove the HTML editor too.
Creating a UI Policy - ServiceNow Wiki

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-15-2016 12:27 PM
Also, use target attribute and set it _blank to open the link automatically in a new window. So your url will look something like this
var url="https://...........?uri=inicdent.do?sys_id="+parsedResponse.result.sys_id;
current.u_incident_number="<a href="+url+" target='_blank'>"+parsedResponse.result.number+"</a>";