How add dynamic "sys_id" on a URL to a catalog variable?

velvizhisujatha
Tera Contributor

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. 

find_real_file.png

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!

 

 

9 REPLIES 9

@velvizhisujatha 

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@velvizhisujatha 

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Mohit Kaushik
Mega Sage
Mega Sage

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

Thanks,
Mohit Kaushik
ServiceNow MVP (2023-2025)

Thanks for the response. It didn't work!

ersureshbe
Giga Sage
Giga Sage

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

find_real_file.png

 

find_real_file.png

Please mark as correct answer if it helped.

Regards,

Suresh.

Regards,
Suresh.