Problem ticket

nameisnani
Mega Sage

Hi Team, 

 

can any one please help me here , Whenever any end user while creating new problem ticket it has to be assign to ' Techhub' .

 

How should i do this can any one please help me .

 

Thanks,

7 REPLIES 7

SN_Learn
Kilo Patron
Kilo Patron

Hi @nameisnani ,

 

Please try to setup assignment rule :

https://docs.servicenow.com/bundle/washingtondc-platform-administration/page/administer/task-table/t...

 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

@SN_Learn 

If you could see in the below image , Assignment group is become mandatory here . 

so my assignment rule is not working here .

what should i do here .

could you please provide steps for me .

nameisnani_0-1722392827405.png

nameisnani_1-1722392860704.png

nameisnani_2-1722392886725.png

 

Hi @nameisnani ,

 

The auto assignment rule won't work here because the 'Assignment group' field is mandatory if it was not mandatory then it will work. So we need to fill it out while submitting the form.

You can try client script in this scenario to populate the assignment group field as below:

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
    if (isLoading || newValue === '') {
        return;
    }
    var user = g_user.userID; //This will give you sysID of user who is filling the form
    if (g_form.isNewRecord()) {
        g_form.setValue('assignment_group', '0a52d3dcd7011200f2d224837e6103f2');
    }
}

 

You can utilize the sysID of user and compare it for some validation.

 

 

----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.

@SN_Learn 

 

which client script ? should i write .