- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-27-2017 04:59 PM
Hello all,
I created a record producer with 2 categories (Project, Software) and a couple of subcategories. The request is that if a certain category "Project" or its corresponding subcategories is selected then it should be assigned to assignment group "ABC", else it should be assigned to group "123".
I had included a line of script when it was only assigned to one person, but now that this requirement came up it no longer works. Is there a line of script I can add to separate the two, possibly an else statement?
Below is what currently is in place:
**We are on Istanbul
Thanks in advance!
Grace
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 06:24 PM
Your script shud be like below
if(current.category == 'inquiry' && (current.subcategory == 'antivirus' || current.subcategory == 'email'))
{
current.assignment_group = 'b85d44954a3623120004689b2d5dd60a';
}
else if(current.category == 'software' && current.subcategory == 'os')
{
current.assignment_group = 'aaccc971c0a8001500fe1ff4302de101';
}
Harish

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-29-2017 06:24 PM
Your script shud be like below
if(current.category == 'inquiry' && (current.subcategory == 'antivirus' || current.subcategory == 'email'))
{
current.assignment_group = 'b85d44954a3623120004689b2d5dd60a';
}
else if(current.category == 'software' && current.subcategory == 'os')
{
current.assignment_group = 'aaccc971c0a8001500fe1ff4302de101';
}
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 11:38 AM
Thank you Harish for all your help, it is working!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎11-30-2017 12:24 PM
Thank you Harish for all your help, it is working!
.. but it's an unmaintainable solution, sadly.
As paablo mentioned, Assignment Lookup Rules is a safer approach, and require no scripting.