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

@Ankur Bawiskar - Have you came across this scenario?

Ankur Bawiskar
Tera Patron
Tera Patron

Hi,

I haven't used it.

What type of form/page opens up? Did you check that?

regards
Ankur

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

It's a UI page that pops up. Then we can select a group and a group member and click on Assign button. It assigns the ticket without asking to fill any mandatory field.

You can check the ui pages here:

https://<<instance-url>>.service-now.com/sys_ui_page_list.do?sysparm_query=nameLIKEworkbench%5Esys_scope%3Dglobal&sysparm_view=

 

And the find agent icon appears when we provide an attribute to the dictionary as below:

ref_contributions=aw_recommendation

Hi @Mahesh Kumar3 , I removed the ref_contributions=aw_recommendation attribute from the assigned to dictionary field but still I can see the "Find Agents" in the incident form. Do you have any idea about the reason behind it