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

How to add link for each task

nikhitha24
Tera Guru

Hi Team,

 

Can someone please help me on below query,

Hiring manager receiving an email with all the task assigned to him, once he received the email he wanted to open the each task from email. if we click on the each task from mail, task should open, 

How to add the link for each task , to open from the email.

Please help me on this.

 

Thank you..

nikhitha24_0-1698945880250.png

 

2 ACCEPTED SOLUTIONS

replace the 

template.print( "<td><left>"+gr.getDisplayValue('number')+"</left></td>" );

with

template.print('<td><left><a href="https://' + gs.getProperty('instance_name') + '.service-now.com/nav_to.do?uri=sn_hr_core_task.do?sys_id=' + gr.sys_id + '">' + gr.number + '</a></left></td>');

you can interchange the gr.number with gr.getDisplayValue('number') , if it not work .. however it should because gr result-set on sn_hr_core_task table. let me know if it works for you.

 

 

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

View solution in original post

Not applicable

Hi @nikhitha24 

 

Do what @AshishKM  already mentioned, but change the url:

 

template.print('<td><left><a href="https://' + gs.getProperty('instance_name') + '.service-now.com/esc?id=hrm_todo&view=sp&sysparm_tableName=sn_hr_core_task&sys_id=' + gr.sys_id + '">' + gr.number + '</a></left></td>');

View solution in original post

9 REPLIES 9

Not applicable

Hi @nikhitha24 

 

Do what @AshishKM  already mentioned, but change the url:

 

template.print('<td><left><a href="https://' + gs.getProperty('instance_name') + '.service-now.com/esc?id=hrm_todo&view=sp&sysparm_tableName=sn_hr_core_task&sys_id=' + gr.sys_id + '">' + gr.number + '</a></left></td>');

Not applicable

Hi @nikhitha24 

 

Was this answer not correct for you?
You can mark multiple answers as correct.

Now you have updated url mention by @Community Alums , try it.

 

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution

@AshishKM @Community Alums  can someone help me on the below query please.

 

for this same notification

once the new tasks are created or updated i want to trigger that notification daily once at specific time

created event, how to call this event in schedule job, to trigger notification daily once.

currently mails are triggering insert or update of the case, no need to send multiple emails.

it needs to trigger daily once.

please help me on this.

nikhitha24_0-1699368103599.png

 

Not applicable
var record = new GlideRecord('tableName');

record.addQuery('field','argument');

record.query();

while (record.next()){

gs.eventQueue('<<eventname>>',record, '','');

}