Find Agents functionality : Assignment Workbench

Mahesh Kumar3
Giga Guru
Giga Guru

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!

 

 

1 ACCEPTED SOLUTION

Mahesh Kumar3
Giga Guru
Giga Guru

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!

View solution in original post

5 REPLIES 5

Mahesh Kumar3
Giga Guru
Giga Guru

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!