Wednesday, October 26, 2016

How to retrieve Specific User associated Manager, Director , Title, Department related information in Service Now?


Scenario : Get a specific user associated attributes such as Manager, Job title, Department, etc..

Solution


- Create a Catalog Client script
- 'Applies to ' 'Variable Set'
- Select the appropriate variable set name
- Select the apprpriate variable name
- Use below script


function onChange(control, oldValue, newValue, isLoading) {
var userValue1 = g_form.getReference('variables.cat_requested_for');
// Get Manager
var managerVar = userValue1.manager;

// Get Job title
var managerVar = userValue1.title;

// Get Department
var managerVar = userValue1.department;

}

3 comments: