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

SanjivMeher
Kilo Patron
Kilo Patron

You can add a condition in the business rule

gs.getUser().getRole('myrole')!='true'


Please mark this response as correct or helpful if it assisted you with your question.

Change 'myrole' to the actual role and this means that the BR applies if they do not have the role selected?  Just want to double check since my scripting is still al little weak.

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.

Forgive me scripting is something I am starting to learn,  The statement basically means this rule does not apply to the admin role?  Is that correct?