How to create template variable and pass it into hyperlink

Skydev22
Tera Contributor

Hello community in hr task template i am trying to pass the sys_id of the subject person of the parent task wich is a case this is what i do link.png

This was working fine but for now it seems like when i click into the link it get converted into  $%7bparent.ref_sn_hr_core_case.subject_person_hr_profile.sys_id%7d and not to the sys_id i want any help on this please i tried to do this via business rule it work but the record producer attach to the task generated no longer get displayed to the user .

2 REPLIES 2

Ravi Gaurav
Giga Sage

Hi @Skydev22 

  • In HR task templates, anything you wrap like ${parent.ref_sn_hr_core_case.subject_person_hr_profile.sys_id} is treated as a template substitution.

  • The platform URL-encodes the ${ } → which is why you see $%7b … %7d.

  • That means ServiceNow didn’t evaluate the expression — it just treated it as literal text.

 

 

@Ravi Gaurav  any solution please ?