I am not able to dot walt to parent.subject_person.user.sys_id from HR Task in a BR

Skydev22
Tera Contributor

Hello Community i want to get the user id of the subject_user in parent case of an HR Task but with no result can someone help me on this ?

3 REPLIES 3

phgdet
Mega Sage

Hi Skydev22, 

Only parent.subject_person.sys_id is enough to retrieve user ID of Subject person.

Brgs,
Phuong

Ankur Bawiskar
Tera Patron
Tera Patron

@Skydev22 

this should give you the user id if you are on HR task

current.parent.subject_user.user_name;

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

Chaitanya ILCR
Kilo Patron

Hi @Skydev22 ,

if you need sysid of the subject person you just need --> current.parent.subject_person

if you need userID(UserName) of the subject need you can use --> current.parent.subject_person.user_name

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya