How to open specific view from a notification URL

samadam
Kilo Sage

I am trying to have the link in notification use a specific view. IS this possible? Do I have to do a mail script for this ?

1 ACCEPTED SOLUTION

Sumanth16
Kilo Patron

Hi @samadam ,

 

If it is the link of the incident/problem number to display in a specific view when the user clicks on a link in an email then, you have to use the below email notification script. Replace incident.do with problem.do if you are going to use in a problem ticket.



var url = gs.getProperty("glide.servlet.uri") + 'nav_to.do?uri=incident.do?sys_id='+current.sys_id+'%26sysparm_view=general'; //Here the General view is used

 

template.print('<a href="' + url + '">' + current.number.getDisplayValue() + '</a>');



Give a name to this script and then go to the notification and use ${mail_script:name of the script}. This should work as I use this in my instance.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,
Sumanth Meda

View solution in original post

2 REPLIES 2

James Chun
Kilo Patron

Hi @samadam,

 

Yeah, should be able to use the URL parameter to use a specific view. Can you provide an example of your URL?

 

Cheers

Sumanth16
Kilo Patron

Hi @samadam ,

 

If it is the link of the incident/problem number to display in a specific view when the user clicks on a link in an email then, you have to use the below email notification script. Replace incident.do with problem.do if you are going to use in a problem ticket.



var url = gs.getProperty("glide.servlet.uri") + 'nav_to.do?uri=incident.do?sys_id='+current.sys_id+'%26sysparm_view=general'; //Here the General view is used

 

template.print('<a href="' + url + '">' + current.number.getDisplayValue() + '</a>');



Give a name to this script and then go to the notification and use ${mail_script:name of the script}. This should work as I use this in my instance.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,
Sumanth Meda