The CreatorCon Call for Content is officially open! Get started here.

How to make changes to records without triggering any Business rules?

Suggy
Giga Sage

I want to make some changes to bulk records say using Background script. During that time, I dont want to trigger any of the Business rules (before, after and async).

Is it possible?

1 ACCEPTED SOLUTION

Hello Suggy, 

 

That's right the setWorkflow(false) doesn't prevent async business rule.  You can either disable it, set it to after, or change your script so that this business does not get triggered.

View solution in original post

5 REPLIES 5

Dnyaneshwaree
Mega Sage

Hello @Suggy ,

Use below lines last in your background script:

gr.autoSysField(false); 

gr.setWorkflow(false); 

Please accept my solution if it works for you and thumps up to mark it as helpful.

Thank you!!

Please accept my solution if it works for you and thumps up to mark it as helpful.
Thank you!!

Dnyaneshwaree Satpute
Tera Guru

That will not stop running the Async BR 🙂 @Dnyaneshwaree 

Hello Suggy, 

 

That's right the setWorkflow(false) doesn't prevent async business rule.  You can either disable it, set it to after, or change your script so that this business does not get triggered.

Sumanth16
Kilo Patron

Hi @Suggy ,

 

You can either use gs.isInteractive() condition in every other BR 

or

You can use current.setWorkflow(false) in current BR which will prevent the other BRs to run.

 

If I could help you with your Query then, please hit the Thumb Icon and mark it as Correct !!

 

Thanks & Regards,
Sumanth Meda