Business Rule for Assignment Rule Contains String

Vasuki
Tera Contributor

Hi,

I need to customize the field in incident form. Below is the requirement.

Field Name : Opened By Group

Condition : If ticket has been raised by one of the service Desk member then Global Service Desk Group should be Display in the Field otherwise First Assignment Group of the Incident should be Visible.

I have written a Business rule for this. I could achieve this above scenario but the problem is I have 15+ Service Desk Groups. yet to come other as well. I don't want to write a OR functionality inside the if.

Anything which I would like to written with the Assignment group which contain the service Desk String then Global Service Desk Group should be visible.

Anyone please help me to filter member of assignment group which contain the string "service Desk" Group ?

 

find_real_file.png 

 

1 ACCEPTED SOLUTION

Murthy Ch
Giga Sage

Hi @Vasuki 

Try this instead:

var gr=new GlideRecord("sys_user_grmember");
gr.addQuery("user",current.caller_id);   //gs.getUserID()
gr.addQuery("group.name","CONTAINS", "Service Desk");
gr.query();
if(gr.next())
{
//rest of your code...
}

Hope it helps..

Thanks,

Murthy

Thanks,
Murthy

View solution in original post

1 REPLY 1

Murthy Ch
Giga Sage

Hi @Vasuki 

Try this instead:

var gr=new GlideRecord("sys_user_grmember");
gr.addQuery("user",current.caller_id);   //gs.getUserID()
gr.addQuery("group.name","CONTAINS", "Service Desk");
gr.query();
if(gr.next())
{
//rest of your code...
}

Hope it helps..

Thanks,

Murthy

Thanks,
Murthy