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.

how to embed hyperlink for SCTASK num and for worknotes

nameisnani
Mega Sage

Hi Team , 

only for particular catalog

We want make this SCTASK00001 ( as a url ) if user clicks on that means it has to redirect to that sctask .

 

nameisnani_0-1701065846581.png

 

 

 

In the same SCTASK we are populating this message in worknotes also . in worknotes also it has to be url 

 

nameisnani_1-1701065846580.png

 

 

 

can anyone please provide me step by step solution to achieve . 

Please provide screenshot for better understandig

 

thanks in advance 

1 ACCEPTED SOLUTION

Just put quotes around sc_task

var url = '[code]<a href="' + gs.getProperty('glide.servlet.uri') + '/'+'sc_task' + '.do?sys_id=' + gr.sys_id + '" target="_blank">' + workflow.scratchpad.task_number + '</a>[/code]';

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.

View solution in original post

11 REPLIES 11

Hi @Sonam_Tiwari  Thanks a lot 

 

It is worked , but it came as separate comment ,  

nameisnani_0-1701073483087.png

 

the url as to there in these sentence 

 

Please review the attachment on the SCTASK0011933

 

 

 

Keep this.

 

var url = '[code]<a href="' + gs.getProperty('glide.servlet.uri') + '/'+'sc_task' + '.do?sys_id=' + gr.sys_id + '" target="_blank">' + 'Please review the attachment on the '+workflow.scratchpad.task_number + '</a>[/code]';

 

Remove the previous part that you had.

task.work_notes = "Please review the attachment on the " + workflow.scratchpad.task_number; // Retriving the Access Provision SCTASK num and updating the worknotes entry

 

Consider indicating the response as helpful and marking it as correct if it meets your needs.