Subcategory shows for a few secods when called from CS

tom the
Giga Guru

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
    }
}
tomthe_0-1739426155885.png

 

tomthe_1-1739426209154.png

 

1 ACCEPTED SOLUTION

tom the
Giga Guru

thank you for all your help, it was an issue with a capital letter on the category value

View solution in original post

5 REPLIES 5

tom the
Giga Guru

thank you for all your help, it was an issue with a capital letter on the category value