- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:23 AM
I created a UI Policy for a condition and wrote a script in advance view as the following:
function onCondition() {
g_form.setValue('assignment_group', "SNS - Admin");
}
The group exists, and the form shows the change but when I click save on the form it shows the following error below the assignment group field:
Match not found, reset to original
The table being used for this UI policy is part of a scoped custom application that inherits from the Incident table. The UI Policy is properly scoped. When I select the assignment group from the list of groups, I can save properly.
I tried the same by creating a client scrip and the same error is shown.
Can someone please let me know how I can fix this issue?
Thank you in advance!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:36 AM
Can you try the doing the same using sys_id of the group instead of the name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:36 AM - edited ‎01-09-2024 01:37 AM
Hello @Navaneeth1,
Assignment group is reference field so, you need to set sys_id of the group instead of group name.
Add sys_id of the group instead of group name.
Please refer below code:
function onCondition() {
g_form.setValue('assignment_group', "sys_id_of _the_group");
}
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:38 AM
Hi Navneeth,
Assignment group is a reference field so it accepts sys_id as a value & not display value of the group so please pass sys_id in your set value like below.
g_form.setValue('assignment_group', 'SYS_ID of Assignment group');
If my answer helps then please mark it correct.
Thanks,
Utpal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:36 AM
Can you try the doing the same using sys_id of the group instead of the name.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:36 AM - edited ‎01-09-2024 01:37 AM
Hello @Navaneeth1,
Assignment group is reference field so, you need to set sys_id of the group instead of group name.
Add sys_id of the group instead of group name.
Please refer below code:
function onCondition() {
g_form.setValue('assignment_group', "sys_id_of _the_group");
}
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:38 AM
Hi Navneeth,
Assignment group is a reference field so it accepts sys_id as a value & not display value of the group so please pass sys_id in your set value like below.
g_form.setValue('assignment_group', 'SYS_ID of Assignment group');
If my answer helps then please mark it correct.
Thanks,
Utpal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-09-2024 01:39 AM - edited ‎01-09-2024 01:43 AM
Hi @Navaneeth1 ,
Why client side and not server side? And why nook utilize assignment lookup rules (off course based on the condition on when/what assignment should be made).
If my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.
best regards
Anders
If my answer has helped with your question, please mark my answer as the accepted solution and give a thumbs up.
Best regards
Anders
Rising star 2024
MVP 2025
linkedIn: https://www.linkedin.com/in/andersskovbjerg/