43 views

Description

Business rule executing before or after update/insert on sys_user_has_role triggering frequently even though it appears no new inserts or updates have occurred on this table

Release or Environment

Subscription Management plugin

Cause

The Subscription Management plugin installs a scheduled job that runs every 4 hours that is meant for Usage Analytics. This performs a test run where it creates a user called 'licensing.role.testing'. This user will receive an assignment of a few roles which is why the business rule on sys_user_has_role is triggered. The job is located here:

https://<instance-name>.service-now.com/nav_to.do?uri=sys_trigger.do?sys_id=87ed51531f2121006d691b220e8b70bd

Upon completion, both the user and the associated sys_user_has_role records are deleted from the tables but can still be found under the Deleted Records module in your navigation pane. In the deleted records, look for the payload containing the user name licensing.role.testing string and you will find all the deleted records for that day related to the scheduled job.

Resolution

If you want to avoid your business rules from giving you what appears to be a false trigger then add a condition to your business rule to avoid executing it when the associated user is named 'licensing.role.testing'

Additional Information

Article Information

Last Updated:2020-11-16 02:57:12
Published:2020-11-16