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

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>');

Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

View solution in original post

9 REPLIES 9

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>');

Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Hi @nikhitha24 

 

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


Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.

Now you have updated url mention by @Peter Bodelier , try it.

 

 

 


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

@AshishKM @Peter Bodelier  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

 

var record = new GlideRecord('tableName');

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

record.query();

while (record.next()){

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

}

Help others to find a correct solution by marking the appropriate response as accepted solution and helpful.