Assignment group Assign To is not populated

keval3
Tera Contributor

Hello All,

My requirement is in the service portal create incident part I have created some variables in which when category is hardware and sub category is mouse, 

then Assignment group should be Hardware

       Assign To should be Fred Luddy

I have written below script but the category and subcategory is working properly but assignment group and assigned_to is not populate. 

if(producer.category == 'hardware' && producer.sub_category == 'mouse'){
current.setDisplayValue('assignment_group', 'Hardware');
//current.assignment_group = '8a5055c9c61122780043563ef53438e3';
current.setDisplayValue('assigned_to', 'Fred Luddy');
}

 let me know what is issue with my script.

Thanks & Regards

Keval

15 REPLIES 15

shloke04
Kilo Patron

Hi @keval ,

I don't see any issue with your script. Just check on few points the value which you are checking for Category and Sub category are correct or not.

You should be using the value of choice and not label when you are checking for Hardware and Mouse.

Please use the script as below:

if(producer.category == 'hardware' && producer.sub_category == 'mouse'){
current.assignment_group= 'Sys ID of Hardware';
current.assigned_to= 'sys id of User';
}

If this does not work then share a screenshot of your choice where you have configured them and the script which you have updated to assist further.

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke

Hope this helps. Please mark the answer as correct/helpful based on impact.

Regards,
Shloke