Populating fields in Adobe Software Request for non-ITIL users
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-17-2024 12:17 PM
So I am seeing users with no roles (non ITSM users) are causing issues with the population of fields for my Requests. I need a fix for this and I think I have found a way of how to do it but I just need someone to write me the appropriate scripts for my idea to work. It goes as follows:
1. Create a Script Include that fixes this main issue.
2. Alter this client script below to use the script include that you have written so they both work together as intended and this issue of mine can be fixed.
Client Script:
function onChange(control, oldValue, newValue, isLoading) {
if (isLoading || newValue == '') {
return;
}
//Added by Maria Schabo - 06/13/2023 - Populate the Employee fields automatically when the employee is selected
populate_department_field();
populate_supervisor_field();
populate_phone_field();
populate_email_field();
function populate_department_field() {
//Get reference
var caller = g_form.getReference('employee', findDept);
function findDept(caller) {
//Set the Dept field
g_form.setValue('employee_dept',caller.department);
}
}
function populate_supervisor_field() {
//Get reference
var callerr = g_form.getReference('employee', findSupervisor);
function findSupervisor(callerr) {
//Set the Supervisor field
g_form.setValue('employee_supervisor',callerr.manager);
}
}
function populate_phone_field() {
//Get reference
var callerp = g_form.getReference('employee', findPhone);
function findPhone(callerp) {
//Set the Phone field
g_form.setValue('employee_phone',callerp.phone);
}
}
function populate_email_field() {
//Get reference
var callere = g_form.getReference('employee', findEmail);
function findEmail(callere) {
//Set the Email field
g_form.setValue('employee_email', callere.email);
}
}
}
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-18-2024 05:43 AM
@swathisarang98 Please help