Access to Subject Person and HR service in notification fields

Anisse Mahtat
Tera Contributor

Hi, 

 

I have a problem in my reminder notification template, i can't have access to ${parent.hr_service} (this is not in the field list) but i am sure the parent is an hr case and i don't know if i can do something to have access to this field or via script for example. 

 

This is my template now (based on hr task fields). 

hr notification template.PNG

 

Thanks

1 ACCEPTED SOLUTION

Sandeep Rajput
Tera Patron
Tera Patron

@Anisse Mahtat The email content are usually of two types.

1. Activity Notification (triggered on HR Lifecycle Events (sn_hr_le_case))

2. HR Task Reminder (triggered on HR Task (sn_hr_core_task))

 

In your case the fields available in the fields section should be from the sn_hr_le_case table and the fields like hr_service or number are already available in the field selector.

 

The parent field defined on the HR LE Case is a reference field which refers to the Task table. Hence it only shows the Task table fields on the design time.

 

Screenshot 2023-12-26 at 2.45.32 PM.png

However, in case your Lifecycle events case has a parent HR case then all the fields related to the parent HR case would be available at the run time and you would be able to access them in notification using ${parent.<field_name>} syntax.

 

This syntax will only print the values only of current HR LE case has a parent case. It will return null/undefined if there is no parent case of the current HR LE case.

 

Screenshot 2023-12-26 at 2.36.17 PM.png

 

Hope this helps.

View solution in original post

2 REPLIES 2

Sandeep Rajput
Tera Patron
Tera Patron

@Anisse Mahtat The email content are usually of two types.

1. Activity Notification (triggered on HR Lifecycle Events (sn_hr_le_case))

2. HR Task Reminder (triggered on HR Task (sn_hr_core_task))

 

In your case the fields available in the fields section should be from the sn_hr_le_case table and the fields like hr_service or number are already available in the field selector.

 

The parent field defined on the HR LE Case is a reference field which refers to the Task table. Hence it only shows the Task table fields on the design time.

 

Screenshot 2023-12-26 at 2.45.32 PM.png

However, in case your Lifecycle events case has a parent HR case then all the fields related to the parent HR case would be available at the run time and you would be able to access them in notification using ${parent.<field_name>} syntax.

 

This syntax will only print the values only of current HR LE case has a parent case. It will return null/undefined if there is no parent case of the current HR LE case.

 

Screenshot 2023-12-26 at 2.36.17 PM.png

 

Hope this helps.

Anil Lande
Kilo Patron

Hi,

Open email contents List and see what is the table. 

If you have created template for HR task then table should be sn_hr_core_task.

Screenshot 2023-12-26 at 2.49.42 PM.png

 

Please appreciate the efforts of community contributors by marking appropriate response as correct answer and helpful, this may help other community users to follow correct solution in future.
Thanks
Anil Lande