Prepopulate opened for and subject person variables with values on HR service
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 01:50 AM
Hi,
I had a requirement where from a HR case I need to create a HR task and with the task type as HR service through which the record producer will be filled by HR task Assignee. now my requirement is to pre -populate the Record producer variables which was opened through the HR task to be pre populated with the HR case users (Opened for, subject person) in the record producer variables (Opened for and subject person).
So, I need help for this requirement. If anyone worked on the similar requirement Please let me know, that would be really helpful.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 06:00 AM
Hello @TOKALAJ
Did you try using this template field on the form ?
Add script to pre-populate this template with values as you said. But still I am not sure if it can be somehow reflected on the record producer form.
Kindly mark my answer as helpful and accept solution if it helped you in anyway. This will help me be recognized for the efforts and also move this questions from unsolved to solved bucket.
Regards,
Shivalika
My LinkedIn - https://www.linkedin.com/in/shivalika-gupta-540346194
My youtube - https://youtube.com/playlist?list=PLsHuNzTdkE5Cn4PyS7HdV0Vg8JsfdgQlA&si=0WynLcOwNeEISQCY
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 07:30 AM
Sorry your requirement is not clear.
Usually the HR case Opened for and Subject person are populated when you generate HR case via record producer
Also Opened for and Subject person fields are not present on HR task.
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 10:32 AM
Hi @Ankur Bawiskar ,
My requirement is I had a HR case with the HR service "ABC" in this HR case I had a HR task created and assigned to HR case Assigned to with the task type "HR service" and the HR service is "DEF" which is associated with the a record producer. So when the Assigned to of the HR case opened this task on portal then a Record producer is provided to him to fill the details of the Parent HR case Subject person. So, I need to pre-populate the Variable on the record producer "Subject person" with the HR task parent subject person
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2025 08:03 PM
So agent is given a record producer to fill which submits HR task.
I hope your record producer has a variable which refers HR case so that the new HR task which gets generated is associated with the HR case
You can use onLoad catalog client script and fetch the HR case variables and populate in record producer variables
what script did you start with and where are you stuck?
If my response helped please mark it correct and close the thread so that it benefits future readers.
Ankur
✨ Certified Technical Architect || ✨ 9x ServiceNow MVP || ✨ ServiceNow Community Leader