I want to create a Hyper link of the RITM number in my worknotes in ServiceNow

Pooja Khatri
Tera Contributor

Hi All ,

 

I have a requirement where I need to hyperlink the RITM number in my worknotes.

 

I am implementing this scenario in my run - script activity in workflow , along with the other part of script. 

 

I am writing the below part of HTM to hyperlink the RITM number , but it is not working out .

 

current.work_notes = 'Request number: ' + '[code]<a href="https://' + instanceName + '.service-now.com/sc_req_item.do?sys_id=' + reqItmSysID + '" target="_blank">' + requestNumber + '</a>[/code]';

 

But it is not creating hyperlink to the request number , can anyone please let me know where did it went wrong ?

5 REPLIES 5

Samaksh Wani
Giga Sage
Giga Sage

What is coming in output, can you showcase the screenshot ?

Pooja Khatri
Tera Contributor

Hi @Samaksh Wani - In the worknotes it does give me the hyper link with the RITM no , but in the email notification .. it prints [code] .. [/code] tag .

 

Attaching the snippet : 

 

PoojaKhatri_0-1689162057464.png

I don't want the code tag to show like this . 

current.work_notes = "'Request number: ' + '<a href="https://' + instanceName + '.service-now.com/sc_req_item.do?sys_id=' + reqItmSysID + '" target="_blank">' + requestNumber + '</a>'";

Hi @Samaksh Wani - It is giving me the parsing error : unexpected token automated when I am trying with the above given line of code .