Auto-populate the manager's e-mail address

Terry Carter Jr
Tera Contributor

Hello All,

I am trying to find a easy and good solution to populate the manager's email address of a user from the sys_user table in a custom variable field for a service catalog item.  The name of the variable field is "mgr_email" and I want to pull the manager's e-mail address in this field.  I am currently working on an order guide for Onboarding/Offboarding so this is one of the business requirements on the catalog items attached to it.    

I have tried various solutions on the community but none seem to work properly or there are so many examples that it overwhelms you to which one should be the right answer.

Any help or assistance would greatly be appreciated. 

Thanks,

Terry   

1 ACCEPTED SOLUTION

Then, select "New Team Member Name"  at the highlighted area.

find_real_file.png

View solution in original post

25 REPLIES 25

This is the catalog client script that I am using to populate the other info on the form that has been working since go-live last month.

function onChange(control, oldValue, newValue, isLoading) {

var employeeName = g_form.getReference(control.name, function(user){

//This will set the value of the fields on the OnBoarding describe needs page
g_form.setValue('u_ob_employee_userid', user.user_name);
g_form.setValue('u_ob_employee_firstname', user.first_name);
g_form.setValue('u_ob_employee_lastname', user.last_name);
g_form.setValue('u_ob_employee_jobtitle', user.title);
g_form.setValue('u_ob_employee_costcenter', user.cost_center);
g_form.setValue('u_ob_employee_location', user.location);
});

}