Is there a way in a fix script to prevent flow from executing?

bradwestvig
Giga Guru

We have a need to update data on a table that a Flow uses as a trigger to execute on.  Before using flow we would use the property "setWorkFlow(false)" to prevent any business rules from firing.  Now the only way we have successfully prevented flow from firing is by inactivating the flow.  This will work, but it causes for extra work to find records that should have had the flow execute.

Any ideas on how to have flow not execute for records updated by a background script?

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi

setting setWorkFlow(false) (hopefully) should also prevent triggering Flows.

But I found an interesting thread and I'm not sure any more whether this is correct: https://community.servicenow.com/community?id=community_question&sys_id=f5c4e8cedb1a7380190dfb243996...

If the menitioned idea in that thread is not implemented yet I only could imagine to check in the Flow trigger whether the update was performed by the "system" user or not. 

Maik

View solution in original post

1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron

Hi

setting setWorkFlow(false) (hopefully) should also prevent triggering Flows.

But I found an interesting thread and I'm not sure any more whether this is correct: https://community.servicenow.com/community?id=community_question&sys_id=f5c4e8cedb1a7380190dfb243996...

If the menitioned idea in that thread is not implemented yet I only could imagine to check in the Flow trigger whether the update was performed by the "system" user or not. 

Maik