- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 04:17 AM - edited 07-09-2025 04:22 AM
Hi.
For a few weeks now we have been stumped technically with a requirement.
We are using universal requests to serve up a catalog item on the portal. The problem is that we want to get hold of the record number in order to use it in an onLoad catalog client script.
As the URL never changes "https://instancename.service-now.com/sp?id=hrm_todos_page" we are unable to pass/read any parameters for use in our onLoad catalog client script.
When I inspect the page, I can see the URL in the console. Is there anyway to get this?
I did try the following but it only gave me the cat name sys_id and not the universal task sys_id.
var incSysid = g_form.getUniqueValue();
alert(incSysid);
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-10-2025 05:11 AM
Just an update as ServiceNow provided a few recommendations:
Here are some recommendations that we can suggest:
Recommendation 1. Retrieving the UNT number from the DOM, since the widget does not change, you can use the widget's sys_id as class name by prefixing v and get the innerText of the DOM element, and parse the text to get the UNT number
Recommendation 2. You can also customize the widget to get the data object from the parent widget and fill the form
Recommendation 3. In this, you can submit the catalog item beforehand when the UNT gets created, and assign a task to the requested user to accept the assets. In this, a task is assigned to the user, and you can create custom actions like "I accept assets" with all variables shown, which can be shown on the task from the RITM for the Todo page.
Docs:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 05:32 AM
on that "hrm_todos_page" page you get to know the tasks
what's your actual business requirement?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 05:36 AM
The requirement is when a mobile or laptop is assigned to a user, they get an action to complete to confirm they have received the device and adhere to certain policy's.
I don't understand what you mean by "on that "hrm_todos_page" page you get to know the tasks"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 06:25 AM
the "hrm_todos_page" portal page list down the Tasks assigned to the user who logins to portal.
when they click the Task what next?
Do you want some specific record to open when they click the task?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-09-2025 06:37 AM - edited 07-09-2025 06:37 AM
We have the correct record showing, as when using universal requests, it renders the catalog item for the user to complete.
The catalog item is initiate state so does not actually exist as a RITM yet till they hit submit.
I want to be able to get hold of the number in red, so that I can use it in my onLoad client script to conduct an script include call.