
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-22-2022 12:27 AM
We are using Find agents functionality of Assignment workbench on case form. Snapshot below:
When we click on find agent icon and select an assignee and click on assign, refer snapshot:
System assigns the case to the member and doesn't ask to fill the mandatory fields.
Is there any way we can enforce mandatory fields before assigning and throw error to user to select mandatory fields first?
I tried writing an onSubmit client script but didn't work:
function onSubmit() {
var fields = g_form.getEditableFields();
for (var x = 0; x < fields.length; x++) {
if ((g_form.isMandatory(fields[x])) && (g_form.getValue(fields[x]) == "")) {
g_form.addErrorMessage("Please fill all the mandatory fields!");
return false;
}
}
}
Thanks in advance!
Solved! Go to Solution.
- Labels:
-
Advanced Work Assignment

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2022 07:17 AM - edited ‎10-25-2022 07:22 AM
I was able to resolve this after exploring a little bit.
There is an OOB script include: MatchingRuleForAssignment.
URL: https://<<instance-name>>.service-now.com/sys_script_include.do?sys_id=0036d3d8d732120058c92cf65e61038c
The method MatchingRuleForAssignment.getConfigData inside this script include contains an object groupFilterData.
This object contains an attribue "encodedQuery", where we can provide our Encoded query which we want for our Assignment Workbench.
Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-25-2022 07:17 AM - edited ‎10-25-2022 07:22 AM
I was able to resolve this after exploring a little bit.
There is an OOB script include: MatchingRuleForAssignment.
URL: https://<<instance-name>>.service-now.com/sys_script_include.do?sys_id=0036d3d8d732120058c92cf65e61038c
The method MatchingRuleForAssignment.getConfigData inside this script include contains an object groupFilterData.
This object contains an attribue "encodedQuery", where we can provide our Encoded query which we want for our Assignment Workbench.
Thanks!