- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 04:57 PM
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...
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-29-2023 06:36 PM
@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';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2023 05:08 AM
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";
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2023 08:03 PM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2023 07:22 AM
Thanks, A script in the Record Producer was the solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2023 06:54 AM - edited 12-07-2023 07:19 AM
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
}