The CreatorCon Call for Content is officially open! Get started here.

Need to pull a value from the Opened For's HR Profile

Rylie Markle
Tera Contributor

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?

 

RylieMarkle_0-1686343451373.pngRylieMarkle_1-1686343462395.png

 

19 REPLIES 19

Sandeep Rajput
Tera Patron
Tera Patron

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.

@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? 

 

RylieMarkle_0-1686598838287.png

 

 

 

 

 

@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?

 

RylieMarkle_1-1686602104297.png

 

RylieMarkle_2-1686602114422.png

 

 

@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

Screenshot 2023-06-14 at 10.03.23 AM.pngScreenshot 2023-06-14 at 10.03.43 AM.png