- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2020 03:29 PM
Hello, I've been asked to find a way to send an automated "welcome" email, with KB articles to a user who has been granted the ITIL role.
I've been trying to do this, through Flow Designer, by setting the trigger to fire every time a new record is created in sys_user_has_role that has a role of itil.
So far the flow technically works, but not the way we're wanting. If one were to manually assign the role to a users record, the email fires as intended. This does not work, however, if the role is granted as an inherited role from a group.
From what I can tell, so long as the inheritance count is empty on the record, it works. If there is any number on the inheritance count, the flow simply does not trigger at all.
Would anyone here happen to have an idea as to why this would be happening and know a way to have a flow trigger when someone inherits the itil role for the FIRST time (last thing I want is for my flow to trigger every single time a user record's inheritance count increases)?
Note: I had also tried setting the condition of the trigger to also include inheritance count is 1, and having it look for both updated and created records. No dice.
Solved! Go to Solution.
- Labels:
-
flow designer

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2020 05:41 AM
Well...you could always deactivate that plugin and set up your security to prevent duplicate roles and increase inheritance count, if this is that important.
Otherwise, yes, you'd have to go another way.
You could possibly do a scheduled job for the end of each day to scan and see if any user had ITIL added today (created on today) and then send your ITIL welcome email.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2020 05:55 PM
Hi,
Have you considered creating a business rule on that table and triggering an event to then fire the notification?
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2020 04:07 AM
From what peter_z had shared, yes, I'll probably have to end up using a business rule in the end. However, I will not be able to do use this table to do so, as it's protected by the contextual security manager plugin. Instead I'm going to have to figure out how to achieve my goal through either the sys_user_grmember or sys_user table.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2020 05:41 AM
Well...you could always deactivate that plugin and set up your security to prevent duplicate roles and increase inheritance count, if this is that important.
Otherwise, yes, you'd have to go another way.
You could possibly do a scheduled job for the end of each day to scan and see if any user had ITIL added today (created on today) and then send your ITIL welcome email.
Please mark reply as Helpful/Correct, if applicable. Thanks!
Please consider marking my reply as Helpful and/or Accept Solution, if applicable. Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2020 06:20 AM
The scheduled job method worked in Flow Designer. Thank you. Apparently using sys_user_has_role as a trigger is a no-go, but you are still able to look up created records in that table. So I just set the trigger to automatically repeat every 2 hours, and look up the info i needed in newly created records of the table. Perfect! Thanks again.