Can someone please let me know where to configure the URL structure to pass in portal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 11:34 PM
Hi All,
we have a widget in portal where it shows all closed tickets raised by us, if we click on one of the record , it gets opened and shows the record history.
Here, we are passing the URL dynamically with sys_id, table name and id.
Can someone please let me know where to configure the URL structure that picks up the required parameters from server script and pass the URL dynamically?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-26-2025 11:52 PM
Hi @klavan32 i share you common implementations
Option 1: Directly in the Widget HTML Template
<a ng-href="/ticket/{{::item.sys_id}}">{{::item.number}}</a>
Option 2: In the Widget Client Controller
$scope.openTicket = function(sys_id) { window.location.href = '/ticket?id=' + sys_id; };
Option 3: Using URL Properties in Server Script
data.tickets.forEach(function(ticket) { ticket.url = '/incident?id=' + ticket.sys_id; });
Recommendations
Check these locations in your widget:
Client script (Controller)
HTML template
Server script
Link function (if present)
For dynamic URL construction, you'll typically see code like:
var url = '/nav_to.do?uri=' + table + '.do?sys_id=' + sys_id;
If using the ServiceNow URL structure, it's often:
/now/nav/ui/classic/params/target/incident.do%3Fsys_id%3Dabc123
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-27-2025 02:02 AM
Hello @klavan32 ,
These options are configured when you create a list widget. To know the options follow below steps:
1. Open the Portal
2. Ctrl+Right click on the list header.
3. Choose "Instance options"
4. Here you will find the required details configured such as Table, Filter etc.
Hope this resolves your query. Please mark helpful or correct to assist others in finding the solution to similar concerns.
If this solution helped resolve your issue, please consider marking it as helpful or correct.
This will assist others in finding the solution faster and close the thread.