one Busines rule triggering another.

AnkushH
Tera Contributor

I have one business rule which is calling a script include inside it and the trigger conditions are After insert Update and few conditions but when it triggers and calls script include to creates incident in third party applications but when it triggers and calls script include and it is triggering update business rule as well.
I have used current.update() in script include to update work notes if anything fails during the transaction.
I dont know how and why. Can i use something else instead of current.update()?

1 REPLY 1

Pau Besalu
Tera Guru

Hello Ankush,

 

Inside the script include, if you don't want to execute business rules when doin current.update() you can use gr.setWorkflow(false), like that:

 

var gr = new GlideRecord('your_table');

if(gr.get('your_sys_id'){

gr.setWorkflow(false); //Disable Business Rule run.

gr.x_field = "test";

gr.update();

}