Query regarding Before BR

Tarasingh26
Tera Expert

Hi All,

 

My question is about Before BR. Suppose I am inserting 100000 records through scheduled fix script daily. Will before BR work in this case?

 

Thanks,

Tara Singh

2 REPLIES 2

Anurag Tripathi
Mega Patron
Mega Patron

Im not sure what you mean by Before BR will work in this case?

But if you insert record the before BR will be executed for each insert unless specifically you have added somewhere in the script not to.

 

By using setWorkflow(false) you can ensure the BRs not run for that transaction , but that will exclude all BRs not specific ones.

-Anurag

Vanderlei
Mega Sage

Hi @Tarasingh26 , how are you?

 

Business Rules are executed before the record is saved, this means that the Business Rules will run normally and only then will your record be saved

 

Your script creates the record >> BR are executed >> Your record is saved

 

And that's why you shouldn't have current.update in business rules beforehand, as they can cause business rules to be re-executed.

 

If my answer helped you, please mark my answer as helpful.

 

Vanderlei Catione Junior | LinkedIn

Senior ServicePortal Developer / TechLead at The Cloud People