Notification not getting triggered.

swathi55
Tera Contributor

Hello,

 

I need to trigger an email when a user with admin access login to prod.  I wrote a After BR on Insert and update on User Role[sys_user_has_role] table-> created a event and a notification. But the BR is not executing and event is not triggering.

 

Is there any other approach or better way to do it?

 

Thanks

 

1 ACCEPTED SOLUTION

yashkamde
Giga Sage

Hello @swathi55 ,

 

The reason your current approach isn't working is that the sys_user_has_role table only tracks changes to a user's assigned roles, not when they actually log into the system.

You can use this approach :

1) Create a Script Action : Navigate to System Policy > Events > Script Actions and click New.

Screenshot 2026-11-03 105940.png

 

2) Create your Custom Event : Navigate to System Policy > Events > Registry and click New.

Screenshot 2026-11-03 105948.png

 

3) Create Notification : Navigate to System Notification > Email > Notifications.

  • Table : User (sys_user)
  • Send when: Event is fired
  • Event name: <event_name>

So as a result, whenever the user logged in user will get the notification :

Screenshot 2026-11-03 111332.pngScreenshot 2026-11-03 112239.pngScreenshot 2026-11-03 112225.png

 

If my response helped mark as helpful and accept the solution.

 

View solution in original post

6 REPLIES 6

Hello @swathi55 ,

 

You can try Approach suggested by @yashkamde  its working fine . I tried that in my pdi and it works .

 

If this helps you then mark it as helpful and accept as solution .

Regards,

Aditya

Thank you..