- 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
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
06-21-2024 10:51 AM
FYI: My issues with #1 and #2 above are resolved with the 3.4.1 release of the plugin.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 02:48 AM
How to pull sys_id of the corresponding Business Application in the widget if its not available on the url
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 02:50 AM
how to get sys_id in the widgets if it is not present on the URL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-05-2025 01:58 PM
If it's not in the URL, what is the use case?
If it is in the URL, you could do something like the following:
"query": "active=true^state=-8^project={sys_id}"