The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Send a notification to assignment groups manager when assignment group changes? Only send when the manager has ‘incident manager’ role.

Anmol Soldier1
Tera Contributor

how to select the role?

 

1 ACCEPTED SOLUTION

Hi Anmol,

Use the below script in advanced condition

var inc_man = GlideRecord('sys_user_has_role');
inc_man.addQuery('user',current.assignment_group.manager);
inc.man.addQuery('role','da3186d90bf63200ecfd818393673a62'); //convert this into propery and use sys_id of incident manager role
inc_man.query();
if(inc_man.next())
	{
		answer = true;
	}

Regards,

Deepankar Mathur

View solution in original post

8 REPLIES 8

Hi Anmol,

Use the below script in advanced condition

var inc_man = GlideRecord('sys_user_has_role');
inc_man.addQuery('user',current.assignment_group.manager);
inc.man.addQuery('role','da3186d90bf63200ecfd818393673a62'); //convert this into propery and use sys_id of incident manager role
inc_man.query();
if(inc_man.next())
	{
		answer = true;
	}

Regards,

Deepankar Mathur

Robbie
Kilo Patron
Kilo Patron

Hi Anmol,

See my first screen shot or below. You can't actually select the role when 'dot-walking' from the the Manager field, its a string field so you'll have to type it. (incident_manager)

Ensure your condition is the same as below and highlighted in red for you.

To help others, please mark correct and/or helpful.

Thanks,

Robbie

find_real_file.png

sawyan3
Tera Contributor

Hi Anmol,

You can query assignment group to manager to roles. I tried on Incident table.

Mark helpful if you find it.

find_real_file.png

Robbie
Kilo Patron
Kilo Patron

Hi Anmol,

 

I hope you found the answer and solution. I am struggling to understand how my response was not marked correct with all the screen shots provided (and first).

So I can feedback and respond better to questions in the community moving forward, can you help me how I could have responded better?

Thanks and glad you found a solution or do you still need help writing via a script?

Robbie