Need to pull a value from the Opened For's HR Profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 01:44 PM
I want to add a value from the Opened For's HR Profile to a tab on the case form. When I go to add fields, it only gives me access to the Subject Person's HR Profile. Is there a way I can make a field with this information? Or do I only have access to pull from the Opened For/By's User Profile?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2023 06:43 PM
In this case your best bet would be to add a Reference field representing opened for's HR Profile on HR Case form, this will allow you to dot walk to a specific field of Opened for's HR Profile inside your Top Donation tab.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 12:40 PM
@Sandeep Rajput Hello! Thanks for the suggestion! If I add a reference field to the HR Profile on the HR Case table, how do I ensure that it will reference the Opened For's HR profile?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-12-2023 01:35 PM
@Sandeep Rajput Hello again. I created this new field (screenshot below) for Opened For's HR Profile (I tried Opened For and Opened By). Then I dot walked and was able to pull the field but it's continuously showing blank when it shouldn't be. Any ideas?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2023 09:34 PM
@Rylie Markle Please populate the value of u_opened_by_hr_profile filed via an onBefore Insert business rule on sn_hr_le_case table. Inside the business rule script, your will query to the HR Profile table apply a filter by using .addQuery('user', current.opened_by); and set the reference field u_opened_by_hr_profile on the current record.
var glideProfile = new GlideRecord('sn_hr_core_profile');
glideProfile.addQuery('user',current.opened_by);
glideProfile.query();
if(glideProfile.next()){
current.u_opened_by_hr_profile = glideProfile;
}
This is how your business rule should look