Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to disable other business rule that might run.

Tadz
Kilo Sage

Hi, how do we   disable other business rule that might run.

My initial approach is to use setWorkflow(false); But I don't know if its right

Does set workflow runs only in workflows?

Thanks,

Tadz

1 ACCEPTED SOLUTION

sumeet_n
Mega Guru

I did try to use setWorkflow(false) yesterday. It does stop the BR execution on target record but it didnt execute the update() in the current BR as well. Below is the gist of what I was trying to achieve.



How to kill a BR running in loop?



I am still looking for the exact behaviour of setWorkflow(false)... I have also referred wiki for the same.


View solution in original post

6 REPLIES 6

The thing is   ... it will update the record but not the work notes . The work notes are of general input type fields and the value in these fields get copied to another table (history). At backend , there is a business rule that copy the value from these fields to activity history of that record and if we are setting workflow false , that business rule will also get skipped.


Tadz
Kilo Sage

Thank you for the reply everyone, thanks for the advice.


Will tell you later about my current issue.



Thanks,


Tadz