How to populate the Assignment Group field on a record created by a Record Producer

Richard Castill
Tera Contributor

Hello,

 

How to populate the Assignment Group field on a record created by a Record Producer...

 

I am wanting the Assignment Group field to be populated based on the Case Type selected on the Record Producer.  Am I looking at a script include with a Glide AJAX call in a client script? A Onload BR? A script in the Record Producer? 

 

Any guidance is appreciated... 

1 ACCEPTED SOLUTION

SoniaShridhar13
Giga Guru

@Richard Castill  you can use record producer script example shared below. If you find my response helpful please Mark Helpful to close the thread.. 

If (producer.varibale == 'ab')

current.assignment_group= 'xyz';

else

current.assignment_group= 'bde';

View solution in original post

8 REPLIES 8

Thanks for the reply Sagar,

I tried:

producer.assignment_group = "group1_sys_id";

It did not populate the Assignment Group on the form.

I changed "producer." to "current." and it changes the Assignment Group field based on the Case Type chosen in the Record Producer a per requirements.

current.assignment_group = "group1_sys_id";

Abhay Kumar1
Giga Sage

@Richard Castill 

I will need some clarity here because you have asked for a script using GlideAjax into client script.

First of all you should be having a table which store case type w.r.t. assignment group so it makes sense to use GlideAjax to be used otherwise 

You solution provided in reply by other expertise will help.

 

Thanks, A script in the Record Producer was the solution.

Tom Thompson
Tera Expert

Sorry, I'm trying to use your script and its always going to the last group. Can you tell me what I'm missing?

 

if(producer.name_of_application == "Sleep"){
current.assignment_group = "22f23e1fdba188544a7f5818489619ad";
} else if(producer.name_of_application == "Neurology"){
current.assignment_group = "d8ba6d004f63b6009f547f75f110c772";
} else if(producer.name_of_application == "GI"){
current.assignment_group = "4474a8de4fd95200cd3d97dd0210c703";
} else {
current.assignment_group = "6af5f36c4f321a4063fa495d0210c73f"; // default group sys_id
}