How to set group manager as assigned to

Manasi8
Tera Contributor

On incident table,if we select group for assignment group then how to set manager of that selected group as a assigned to field?

2 REPLIES 2

Claude DAmico
Kilo Sage

You can use an onChange Client Script that looks like this:

 

function onChange(control, oldValue, newValue, isLoading, isTemplate) {
   if (isLoading || newValue === '') {
      return;
   }

   //Type appropriate comment here, and begin script below
	g_form.getReference('assignment_group', doRef);
}

function doRef(aGroup){
	if(aGroup.manager != ''){
		g_form.setValue('assigned_to', aGroup.manager);
	}
}

 

Claude E. D'Amico, III - CSA

Siva Jyothi M
Mega Sage

Hi @Manasi8,

 

You can achieve this in two ways one is through client script and the other is through BR. With on-change client script, you can see the assigned to value as soon the assignment group is changed, with BR the assigned to gets populate only after there is some update action on the record.

Follow the below steps it it is through a Business rule using condition builder, without scripting:

SivaJyothiM_0-1694232760151.png

Then under actions set like this, go to Show Related Fields and select Assignment group- Group fields and then Manager.

SivaJyothiM_2-1694232860723.pngSivaJyothiM_3-1694232913139.pngSivaJyothiM_4-1694232924938.png

Mark this answer as correct and helpful if it solves your issue.

 

Regards,

Siva Jyothi M.