Clear Assigned To when Assignment Group is Change?

John Vo1
Tera Guru

Is there any way to clear the "Assigned to:" when you change the "Assignment Group"?

I have seen a couple of times where for example the incident Assignment Group is set to Desktop Support — Houston and the assigned to is Joe, then I would set the incident Assignment Group to Desktop Architecture, hit save, and it would keep the Assigned to as Joe even though I am not in that group.

1 ACCEPTED SOLUTION

Chuck Tomasi
Tera Patron

Hi John,



Use an onChange client script on the Assignment Group field something like this:



function onChange(control, oldValue, newValue, isLoading, isTemplate) {


      if (isLoading)


                  return;



        g_form.setValue('assigned_to', '');


}


View solution in original post

6 REPLIES 6

Here is the issue.   When I'm on a TASK and change the Assignment Group the Assigned To still shows the name of current owner.   I want that field to be blank.   But on Incident it works correctly.



Thanks,


John


When you refer to TASK, are you talking about a catalog task (sc_task table record)? If so, you will need to duplicate the onChange client script from incident to the other table. (onChange) Client scripts are designed to watch for changes on one field on one table. Incident and TASK (sc_task?) are two separate things to the platform so you will need two separate clients scripts. This should be as simple as opening the incident client script, changing the table accordingly, then do Insert (to create a new record.)