issues with direct assignment to team member for incidents

Community Alums
Not applicable

Hi, 

 

The assignee field for incidents should be blocked following a group reassignment to prevent direct user assignments, but it fails to do so. The potential cause of the issue could be the below client script related, which should ideally enforce the blocking of the assignee field but is failing support team can still directly assign the incidents. 

What else can I specifically check for 

 

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading) {
        return;
    }
   
    //Clear out and disable the Assigned To field
    //Also make the assigned to not mandatory because it is not correct for the person reassigning to pick the Assignee
    if (oldValue != newValue) {
       
        g_form.clearValue('assigned_to');
        g_form.setDisabled('assigned_to', true);
        g_form.setMandatory('assigned_to', false);
       
}
}
1 ACCEPTED SOLUTION

Weird
Mega Sage

Well, there can be other things, but the most important thing is that mandatory is more important many other options.
You could try changing the order to 
g_fom.setMandatory('assigned_to', false);
g_form.clearValue('assigned_to');
g_form.setDisabled('assigned_to', true);


EDIT:
Clearvalue can be before mandatory, but you can't make a mandatory field read only or disabled.

View solution in original post

1 REPLY 1

Weird
Mega Sage

Well, there can be other things, but the most important thing is that mandatory is more important many other options.
You could try changing the order to 
g_fom.setMandatory('assigned_to', false);
g_form.clearValue('assigned_to');
g_form.setDisabled('assigned_to', true);


EDIT:
Clearvalue can be before mandatory, but you can't make a mandatory field read only or disabled.