Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-12-2025 09:58 PM
Hi,
I have this use case where need to set, some fields once the caller is set to Abel Tuter, I used a CS onChange, I could say it is working but subcategory shows for les than a second then goes back to -none-
I used the following script
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if (newValue == '62826bf03710200044e0bfc8bcbe5df1') { // Sys ID = Abel Tuter
g_form.setValue('category', 'end_user_devices'); // Set Category
g_form.setValue('subcategory', 'Keyboard'); // Set Subcategory
g_form.setValue('short_description', 'This is the end user device'); // Short Description
g_form.setValue('impact', '2'); // Impact = Medium
g_form.setValue('urgency', '3'); // Urgency = Low
g_form.setValue('service_offering', 'fae7e9e7c3635210075edf3d050131a5');// Set SO = Azure AD Auth
g_form.setValue('cmdb_ci', '780b8ce8735423002728660c4cf6a7e7'); // Set CI = *MACBOOK-AIR-13
}
}
Solved! Go to Solution.
1 ACCEPTED SOLUTION
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 04:52 PM
thank you for all your help, it was an issue with a capital letter on the category value
5 REPLIES 5
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-26-2025 04:52 PM
thank you for all your help, it was an issue with a capital letter on the category value