Why would a Before Insert Business Rule on sys_user table affect existing records?

Chris Cardenas
Tera Contributor

We had a situation where we tested a Business Rule that runs Before Insert on the sys_user table.

The goal was to target new account creations and adjust them to Web service access only

However shortly after creation it affected a large amount of already existing user records.

Why would this happen? I believed that a Before Insert rule would only run/affect a new record being created?

ChrisCardenas_0-1730836087375.png

 

1 ACCEPTED SOLUTION

jcmings
Mega Sage

As some of the other commenters have posted, something else is causing the issue; you are correct that the Insert BR will only fire on new record creation. I'd look at other BRs and scheduled jobs you have.

View solution in original post

10 REPLIES 10

Bert_c1
Kilo Patron

After reviewing the documentation provided, It seems to reinforce that the rule should only apply on the record being inserted into the database, and would not apply to existing records.

 

Option When the rule runs

BeforeAfter the user submits the form but before any action is taken on the record in the database.

Option When the rule runs

InsertWhen the user creates a new record and the system inserts it into the database.

 

Definition:

Table: User [sys_user]

Advanced: TRUE

When: before

Insert: TRUE

 

Filter Conditions:

Email - does not contain - '@example'

and

Email - does not contain - '@example2'

 

Actions:

Set field values:

Web service access only - To - true

Bert_c1
Kilo Patron

Post your script, as you say "Advanced" is checked. As far as applying the same logic to existing record, put the script logic in Scripts - Background, or a scheduled job and run it.

I don't have any extra script applied. I am only using Set Field values.