How to stop running business rules?

ak4
Tera Contributor

How to stop running business rules?

 

5 REPLIES 5

MrMuhammad
Giga Sage

Very common question, answered by many other posts on the community. 

current.setWorkflow(false);

current --> GlideRecordObject

 

Regards,
Muhammad

Nitin_NOW
Tera Guru

If you want to stop a business rule from running, take a look at the

setWorkflow(false);  

setAbortAction(true);

 

https://developer.servicenow.com/app.do#!/api_doc?v=jakarta&id=r_GlideRecord-setAbortAction_Boolean

Please hit correct if this resolves your issue.

Thanks

Nitin

Hi Ak 

If you feel my answer resolves your issue, please feel free to mark correct so it goes away from unanswered list.

Thanks

Nitin

Akshata jamdar
Mega Guru

Hello ak,

 

You can put condition to execute the business rule or if you want to stop all business rules to execute use

gr.setWorkFlow(false) so no business rules are run gr.autoSysField(false) so that the records don't have system updates.

Hope this will help you.

Kindly mark an answer as correct and helpful if it will resolve your query.

Regards,

Akshata