Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Need help on mail script to link the ticket to Workspace instead of legacy view

Bird1
Mega Sage

Hello

I am working on mail script. I found the  ${URI_REF}  will link the ticket to legacy view only but we would like to promote more usage to Workspace, so we need to create the mail script that will show the ticket number and after we click the link it will go to the Workspace instead.

 

Sample

Now when click the ticket link which is from ${URI_REF}, it will go to

https://abc.service-now.com/nav_to.do?uri=%2Fx_alite_us_treas_0_us_treasury_request.do%3Fsys_id%3D2c1ce2f187c99550a62420e5cebb35a6%26sysparm_stack%3Dx_alite_us_treas_0_us_treasury_request_list.do%3Fsysparm_query%3Dactive%3Dtrue

 

but I need it to re-direct to

https://abc.service-now.com/x/alite/treasury/record/x_alite_us_treas_0_us_treasury_request/2c1ce2f187c99550a62420e5cebb35a6

1 ACCEPTED SOLUTION

@Bird i got this working some how can you try this?

var agentURL = '<a href="' + gs.getProperty('glide.servlet.uri') + '/x/alite/treasury/record/'+ current.getTableName() + '/' + current.sys_id + '">' + 'Click Here'+ '</a>';
  template.print(agentURL + "<br />");

Mark this correct if it helps you

View solution in original post

10 REPLIES 10

It's workable finally!

Appreciate for your help. 🙂