auto populate and make the field read only depending upon the assignment group on incident form

Yash38
Kilo Guru

if assignment group is service desk then Business service field should be read only and populate as IT service, for other assignment group that field should be editable and empty.

(create a field Business service on incident form)

1 ACCEPTED SOLUTION

Create an Onchange Client script on incident table

Field Name - Assignment Group

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        g_form.setReadOnly('business_service', false);
    }
    if (newValue == "d625dccec0a8016700a222a0f7900d06") {
        g_form.setValue('business_service', '281a4d5fc0a8000b00e4ba489a83eedc');
        g_form.setReadOnly('business_service', true);
    } else {
        g_form.setValue('business_service', '');
        g_form.setReadOnly('business_service', false);
    }

  }

Please mark my answer correct and helpful if this resolves your issue.

Regards,

Palak

View solution in original post

7 REPLIES 7

Great!!! Please mark my answer correct and helpful.

sriram35
Kilo Guru

Hi,

 

You can achieve this by using UI Policy.

 

Create a new UI Policy

 

Select Table as Incident

In condition select Assignment group is Service Desk and save the form.

In UI Policy action select field as Business Service and Read only True.

 

Below is Example:

 

Hope this helps!

If I have answered your question, please mark my response as correct and/or helpful.

Thanks,

Sriram

 

find_real_file.png