Updating HR profile value
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-27-2025 10:48 PM
Hi All,
I have a requirement for adding 'User HR profile' value in Associated Allgetaion table.
So i have created a custom field on 'Associated Allegations' table called USER HR PROFILE which is a reference field referring to user HR profile table. I am trying to populate the value on this field based on the 'Subjects of Allegation' field value. So to achieve this i have configured the below business rule.
When : Before -Update
Can anyone suggest.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 09:21 PM - edited 05-28-2025 09:24 PM
HI @Ankur Bawiskar ,
Yes 'Involved_party' is referring to 'sys_user' table.
And yes the HR profile is present for the user selected but still not entering the if condition.
I tried removing if.next() and added only if... in this case script enters if condition but getting 'undefined' value.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-28-2025 09:42 PM
did you try to run background script with that hard-coded sysId of user and see if record is found?
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
06-22-2025 09:52 PM
Hope you are doing good.
Did my reply answer your question?
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