I want link on notificarion email for directly go incident/request page on agent workspace

Ganesh Palve
Tera Expert

when user got notification when SLA is Breached as you can see below 

find_real_file.png

when user click on that Link he is goes to below agent workspace page 

find_real_file.png

instead of that page i want to go deirectly on that incident form like below Screen Shot ...Above is TASK SLA

find_real_file.png

Below is notification email script

find_real_file.png

 

please guide me how can i do this

3 REPLIES 3

Sulabh Garg
Mega Sage
Mega Sage

Hello Ganesh,

Please see below to generate a link a record in agent workspace in email notifications. DOCS LINK

 

The ${URI} and ${URI_REF} variables don't apply to records in Workspace. To link to a record in Workspace, create a mail script and reference it in your notification. For more information on using mail scripts, see JavaScript in emails.

The mail script that you create should print a URL to the notification. The URL must have the following format:
https://<instance_name>/now/workspace/<workspace_name>/record/<table_name>/<sys_id>
The following example script shows the logic that a mail script must include to create a link to a record in Workspace.
// Dynamically construct an Agent Workspace URL and insert a link in the notification
  var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/now/workspace/agent/record/'+ current.getTableName() + '/' + current.sys_id + '">' + current.number + '</a>';
  template.print(agentURL + "<br />");

Please Mark Correct/helpful, if applicable, Thanks!! 

Regards

Sulabh Garg

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg

Hi Sulabh,

Thank you for your reply but I already apply above script still it is not working

 

Thanks,

ganesh

Please apply logs in your mail script and see what url is generated under variable "agentURL" and see what is going wrong.

Also check the property value on your instance 'glide.servlet.uri'.

Hope it helps.

Please Mark Correct/helpful, if applicable, Thanks!!
Regards
Sulabh Garg