How add dynamic "sys_id" on a URL to a catalog variable?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 02:16 AM
Hi Team,
I would like to know how can I route to Service Portal using a URL embedded to a catalog variable.
For eg. I have a preferred contact variable, where I have added a URL on that annotation part but I'm unable to route to the logged in user user profile.
On click of the hyperlink it should route to the "sp?id=user_profile&sys_id=" only if I pass a static value I'm able to get to the user profile page. What syntax is required to make it dynamic on a variable?
Please help!
- Labels:
-
Service Catalog
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-23-2022 09:09 PM
I have shared solution here 1 year ago and it works in native + portal using macro and widget
Need to implement catalog URL Macro with the help of Jelly script
If my response helped please mark it correct and helpful to close the thread
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2022 06:01 AM
Hope you are doing good.
Did my reply answer your question?
If my response helped please close the thread by marking appropriate response as correct so that it benefits future readers.
Regards
Ankur
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 02:37 AM
Hi There,
Have you tried adding the sp?id=user_profile&sys_id=+gs.getUserID(). Not sure if it will work but you can give it a try.
Thanks,
Mohit Kaushik
Mohit Kaushik
ServiceNow MVP (2023-2025)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-21-2022 04:59 AM
Thanks for the response. It didn't work!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-21-2022 06:10 AM
Hi,
I have questions in your url. The Page = user_profile accessable every one ie., end user and support user.
sp?id=user_profile&sys_id=
If support user only no issue - They will have enough role to access the sys_user table.
Not recommended end user use this table - sys_user.
Instead you can route it to this page else you should give a button option to to popup the text box and based on entry you should update in sys_user table. It's my view
Please mark as correct answer if it helped.
Regards,
Suresh.
Suresh.