Link to service portal page from email notification

Community Alums
Not applicable

Hi All,
I am working on redirection link from email notification to open any type of request(incident, problem, change, request item, request etc) in portal view.

I am giving this link:
https://myinstance.service-now.com/esc?id=form&table=sc_request&sys_id=67923fdf1bf5bd10670211739b4bcb2e
So I need to generate a dynamic link, but this id=form will be varied. For request it's order_status. I want make it generic.
Is there any way to open any type of task, by keeping this id as generic

Thanks

3 REPLIES 3

Kartik Magadum
Kilo Sage

Hello @Community Alums 

 

Please try below approach. 

 

var recordType = "sc_request"; // You can change this dynamically based on your requirements
var recordSysID = current.sys_id; // Assuming you have the sys_id of the record

var dynamicLink = "nav_to.do?uri=" + encodeURIComponent(recordType + ".do?sys_id=" + recordSysID);
var hyperlink = '<a href="' + dynamicLink + '" target="_blank">LINK</a>';

 And finally use variable "hyperlink" to open a record.

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Thanks & Regards,

Kartik Magadum

 

Community Alums
Not applicable

Hi @Kartik Magadum 
Thanks for the response, but I want to open my page in Portal view. For that I think id is needed. But I want to fetch it dynamically.
Thanks

BenjaminY
Tera Contributor

Did you ever solve this problem? Currently working on something similar