- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 01:45 AM
How to pass data from one portal page to another portal page?
In the past I have passed the data from widget to another widgets... but what about pages ?? Any leads
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 01:49 AM
You can pass data in the URL when navigating from one portal page to another.
<a href="/sp?id=target_page&user_id={{user.sys_id}}">Go to Target Page</a>
Following can be used to retrive the data.
var userId = $location.search().user_id; // Retrieves the value from the URL
console.log("User ID:", userId);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 01:51 AM
Hey @sanyalshubh
Keep a thumb Rule :-
To access data between two pages, we need to send data via URL as shown below.
Set URL as below on source page client controller :
function ($scope, $window) {
var c = this:
c.onClick = function () {
$window.location.href = "/sp?id=new_portal_page&incidentNumber=" + INC00001234;
}
}
On the server side of the target page, we can use below code to access those parameters:
var incNumber = $sp.getParameter('incidentNumber');
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 01:49 AM
You can pass data in the URL when navigating from one portal page to another.
<a href="/sp?id=target_page&user_id={{user.sys_id}}">Go to Target Page</a>
Following can be used to retrive the data.
var userId = $location.search().user_id; // Retrieves the value from the URL
console.log("User ID:", userId);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 02:04 AM
Thanks @Sandeep Rajput this worked 🙂
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 01:51 AM
Hey @sanyalshubh
Keep a thumb Rule :-
To access data between two pages, we need to send data via URL as shown below.
Set URL as below on source page client controller :
function ($scope, $window) {
var c = this:
c.onClick = function () {
$window.location.href = "/sp?id=new_portal_page&incidentNumber=" + INC00001234;
}
}
On the server side of the target page, we can use below code to access those parameters:
var incNumber = $sp.getParameter('incidentNumber');
If you found my response helpful, I would greatly appreciate it if you could mark it as "Accepted Solution" and "Helpful."
Your support not only benefits the community but also encourages me to continue assisting. Thank you so much!
Thanks and Regards
Ravi Gaurav | ServiceNow MVP 2025,2024 | ServiceNow Practice Lead | Solution Architect
CGI
M.Tech in Data Science & AI
YouTube: https://www.youtube.com/@learnservicenowwithravi
LinkedIn: https://www.linkedin.com/in/ravi-gaurav-a67542aa/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2025 02:04 AM
Thanks @Ravi Gaurav as usual thanks a ton 🙂