- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 03:32 AM - edited 06-05-2023 03:32 AM
I have a requirement to autopopulate the {subject person} in the description of HR task template. The subject person refers to another table. The description is like '<some text {subject person} some text>'. I have to only change the subject person dynamically for that particular HR task template. How to write BR for the same?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2023 06:22 AM - edited 06-05-2023 06:22 AM
@Sid_Takali Thank you for your quick response!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2025 10:25 AM
This works too: ${parent.ref_sn_hr_core_case.subject_person.name}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-15-2025 10:57 AM
Hi @ArpitaVK
Create a Before Insert Business Rule on the HR Task (sn_hr_core_task) table.
In the script, check if the record uses your specific HR Task Template.
If yes, replace {subject person} in the description with the actual subject_person.getDisplayValue().
Example snippet:
if (current.template.name == 'Onboarding Checklist' && current.description) {
var person = current.subject_person.getDisplayValue();
current.description = current.description.replace(/\{subject person\}/gi, person);
}✅ Runs only for that template
✅ Dynamically inserts the subject person’s name in the description before saving
