UI action script for change any value to Service Desk

Suyash Joshi
Tera Contributor

Hello Everyone,

I need a requirement of UI action in which If user is select any group in assignment group the group changed to 'Service Desk' i try many time but it is not display my field just getting empty.

For the help Thanks in advance

Best Regards,

Suyash

11 REPLIES 11

VaishnaviShinde
Kilo Sage

Hello @Suyash Joshi ,

 

Have checked BR and client script or assignment Rules? Can share your code?

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde

Hi @VaishnaviShinde 

Only want to run the UI action script it is a business requirement.

I  can share my script:-

var selectedAssignmentGroup = current.assignment_group;

if (selectedAssignmentGroup) {
gs.addInfoMessage('Updating assignment group to Service Desk.');

current.assignment_group = 'Service Desk';

current.update();
} else {
gs.addInfoMessage('No assignment group specified. Nothing to update.');
}

Thanks and Regards,

Suyash

Hello @Suyash Joshi ,

Add below script in your ui action:

 

var selectedAssignmentGroup = current.assignment_group;

if (selectedAssignmentGroup) {
gs.addInfoMessage('Updating assignment group to Service Desk.');

if(current.assigned_to != ' ' || current.assigned_to != '')

{

current.assigned_to= ' ';

}

current.assignment_group = 'Service Desk'; //Add the sys_id of group or create property 

current.update();
} else {
gs.addInfoMessage('No assignment group specified. Nothing to update.');
}

 

Please Mark my Solution as Accept and Give me thumbs up, if you find it Helpful.

 

Regards,

Vaishnavi Shinde

Hi @VaishnaviShinde ,

Your script is uable to display the Service Desk after any group is select in the assignment group