- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 07:52 AM - edited 02-15-2024 08:04 AM
1) For the Portal Object Widget, THIS page says for the Record option, "If this field is empty, the widget displays information based on the sys_id parameter provided in the portal web page URL." but if I leave the field blank, it shows and uses the default example from the alm_asset table. How do I get it to pull the sys_id from the URL?
2) For the Portal Data List Widget, it works great for just providing a list such as replacing the default list widget on (a clone of) the my_projects page (which comes with the 'Customer Project Management'/sn_csm_ppm plugin). However, can this be used on a Record Page to show sub lists? If I place it on (a clone of) the project_detail page, a) it doesn't pick up the project record and rather than showing the Contacts for that Customer Project, it instead shows all Contacts. (As well, if I click on a Category, the URL loses the sys_id shown before I select a Category) How can I get it to filter? THIS page doesn't give options on the query line
I've tested with Vancouver Patch 6 and Washington Patch 0 and the latest version 3.3 of the 'UI Components for Customer Portals' plugin
Thanks!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-15-2024 10:33 AM
You'd need to modify the widget and put it in the Server Script field, entering it in the field like that won't work. Then from the server script pass it to the client controller or HTML template.
Something similar to the below to pass the data.
Server Script:
var id = $sp.getParameter('sys_id');
Client Controller:
c.id = $scope.data.id
HTML Template:
{{c.id}}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-22-2024 09:43 AM
ServiceNow responded:
#1 is a known bug which they are working on
#2 is an enhancement on their roadmap
Based on this, I am accepting previous suggestion
Changes made to Server Script of Portal Object widget
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 10:41 PM
Here the use case is :
the portal opens when clicked on the related tab on the Business application. Before we were passing the sys_id to the url through UI action. Now we dont want to show it in the URL but still want to access sys_id in the widget.
How to achieve this?