Turn off business rule during flow execution

Ravi117
Kilo Contributor

I am updating multiple records thru flow designer. Since Business rules are set on the fields which are getting updated, i am not getting the expected results. please help on how to disable the business rules during the flow execution.

similar to setworkflow(false) used in Scripts.

7 REPLIES 7

P-Rudenko-SN
ServiceNow Employee
ServiceNow Employee

I don't think there is any flow action that would execute the logic similar to setworkflow(false). Are the many Business Rules to be deactivated? As a workaround, you could do the call to "sys_script", set the required BRs to active=false before your records are updated, then re-activate the BRs afterwards. 

Let me know if this helps.

Thank You Pavlo.

Inactivating and activating the BR thru script can impact other use cases as i am working on reassigning cases to  assignee's mgr when assignee is inactive

OlaN
Giga Sage
Giga Sage

Hi.

I did some experimentation, just for the fun of it, and there is a way around.

I can't say that I would recommend going down this way, a better way might be considering to change the conditions on when your business rules run, if that is possible.

That being said, a way to work around the business rules is to create a custom script action in the Flow, and call it to change the values as needed, and in the script insert the same old gr.setWorkflow(false); as you would in any script.

Example below.

find_real_file.png

 

find_real_file.png

HI Olan,

I have tried this  and still its not working.

Scenario: I need to paste copy additional comments  from task to task but it should now copy the same on REQ item which is parent. We have push comments BR for both sc_task and sc_req_item tables  to exchange the comments. Now once i place this action before the update task or after update  task still its not working. 

I only want to stop the BR when the task is created and comment is pasted.

Thanks in advance