- 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 07:15 AM
If your business rule is running on the case table then current will be a case record.
I think you need to change current for a gliderecord query to the table you require.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 08:35 AM
The business rule is running on the related table case_incidents. The data I need updating is occuring in the correct place. I'm just in need to dynamically set the value of where the u_incident_number field links to and have it display number of the new INC.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 07:20 AM
Christina,
What is the field type of u_incident_number? If it is a reference type, what table is it referencing to?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-11-2016 08:37 AM