
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 07:39 AM
I am trying to set value of assignment group using client script on onSubmit functionality, but the below code is not working. Please help :
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 08:12 AM
You should use an Assignment rule. All that script is doing is setting an assignment group variable, not the assignment group on the record.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 08:38 AM
It is not working 😞
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 08:30 AM
Are you trying to set assignment group on task based on some variable value?
It can be achieved by task activity in workflow:
if(current.variables.authority=='tax')
{
task.assignment_group='sys_id';
}
Raghav
MVP 2023

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 08:41 AM
current can't be read in catalog client script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2021 09:42 AM
This code is for workflow task activity not for client script.
You can achieve this through workflow easily
Raghav
MVP 2023
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎07-22-2024 09:50 PM
Without client script, we can achieve this; you can add the script in record producer
(function producerScript(current, producer) {
var inc = new GlideRecord('sys_user_group');
inc.addQuery('name', 'ABC');
inc.query();
if (inc.next()) {
current.assignment_group = inc.sys_id;
} else {
gs.error('Assignment group "ABC" not found');
}
})(current, producer);
Thanks,
Akash