Interested in a ServiceNow event built for developers? Registration for now[dev]26 is officially open!

Custom ${URI_REF} link not working

matthew_hughes
Kilo Sage

Within my workflow, I've specified an event that takes the user to a certain record in the 'sc_req_item' table if a request has been cancelled by specifying 'grEvent.uri' in the below code:

 

workflow issue screen 1.png

 

The below is my notification:

workflow issue screen 2.png

 

 However, when the email notification is generated, the ${URI_REF} instead takes the user to the 'sysapproval_approver' record, which is not what I want.

 

What do I need to do in my notification or workflow so that it takes the user to the URL specified in 'grEvent.uri' 

 

 

6 REPLIES 6

Michael Fry1
Kilo Patron

You need to define the URL you want to take the user too. See example here: https://www.servicenow.com/community/developer-forum/getting-uri-ref-to-display-incident-number/m-p/... 

Hi @Michael Fry1 I tried that and unfortunately I couldn't find the answer I was looking for. I did try using 'sc_req_item&sys_id=${event.parm1}&view=sp' in my link but '${event.parm1}' only shows number. How would I get it to show the sys_id?

Ankur Bawiskar
Tera Patron

@matthew_hughes 

your notification is on sysapproval_approver table so ${URI_REF} will take user to Approval record and not RITM record

please use email script and form the URL and then include that email script in email body

 

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

Would you have an example on how to form the link?