How do you set a business rule to not run for users with a specified role?

Bill11
Kilo Expert

I have a Business Rule that sets the Priority to a Sev 3 on incident creation.  I need users with a specific role to not be affected by this rule.  If someone can help me find the piece I am missing I would appreciate it.

1 ACCEPTED SOLUTION

Sujata Vishwak1
Mega Expert

Hi,

 

You can add condition in your business rule as below:

Please note:       not(!) symbol will always be used at start of function for business rules condition then only it will work.

!gs.hasRole('role_name')

find_real_file.png

 

 

Thanks,

Sujata Vishwakarma

 

 

Please mark if you find this helpful.

View solution in original post

7 REPLIES 7

It'll check if you have role admin, if you don't have it the condition will be true and the business rule will execute.

If you have admin role the condition will return false and therefore not execute.

As a note with the with that I found out the hard way back when I started, keep in mind that the admin inherits all of the roles so this could limit that at times.

Abhinay Erra
Giga Sage

Use this 

 

gs.getUser().getRoles().toArray().join().indexOf("your role name goes here")>-1