- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-16-2018 01:23 PM
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.
Solved! Go to Solution.
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 05:37 AM
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')
Thanks,
Sujata Vishwakarma
Please mark if you find this helpful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 06:21 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 07:24 AM
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-17-2018 07:29 AM
Use this
gs.getUser().getRoles().toArray().join().indexOf("your role name goes here")>-1