Javascript on advanced reference qualifier doesn't work by using Business Rule "GetGroupFilter"

John91
Tera Contributor

Hi all,

I'd like to filter "assigned group" with Business Rule "GetGroupFilter" not to be seen the groups of the other group type by controlling with roles.
I set the script below to advanced reference qualifier in the record of "assigned group" (task table) of Dictionary Entry, but it doesn't work.

javascript: if (gs.hasRole("roleA")) {global.GetGroupFilter("typeA");} else if (gs.hasRole("roleB")) {global.GetGroupFilter("typeB");}

I tried creating "Dynamic Filter Option" record and wrote the above script to set it to dynamic reference qualifier, then it worked.

However, actually I want to use this script to the record of "assigned group" (sn_customerservice_case table) with override.
In the override record, there is no "dynamic" field so I can't set the "Dynamic Filter Option".

Please give me any good idea.

Thanks!

4 REPLIES 4

Hitoshi Ozawa
Giga Sage
Giga Sage

Hi John,

Business rule is often used to update tables. It will be necessary to copy the function and create a Script Include to use it in reference qualifier.

Similar question in below. Check Chuck's reply.

https://community.servicenow.com/community?id=community_question&sys_id=533ac3a9db5cdbc01dcaf3231f96...

Hi Hitoshi,

Thanks for your quick reply.

I tried copying  this Business Rule in the same table, but it doesn't work.
I can't get it.

Anyway, I copied that to Script Include, but neither does it work.

I may not understand how to convert to Script Include, then I will try again.
If this try won't go well, I will reply. 

Thanks,

My bad.

I've misread the question.

Akash Rajprohit
Mega Contributor
Hi John, Business rule is often used to update tables. It will be necessary to copy the function and create a Script Include to use it in reference qualifier. Similar question in below. Check Chuck's reply. https://community.servicenow.com/community?id=community_question&sys_id=533ac3a9db5cdbc01dcaf3231f961999