Is there a way to stop flow designer from running

JLeong
Mega Sage

Is there a way to stop a flow designer from running?

example:

setWorkflow(false);   //Do not run business rules

autoSysFields(false);  //Do not update system fields

Thank you!

 

1 ACCEPTED SOLUTION

Hi Mark,

Yes it triggered.

Orlando Patch 7

I am not sure any additional options are available on flow properties because I couldn't find it.

Script:

var gr = new GlideRecord('incident');

gr.initialize();
gr.setWorkflow(false);
var sysId = gr.insert();

gs.info(sysId);

Flow:

find_real_file.png

Output:

find_real_file.png

find_real_file.png

Regards
Ankur

View solution in original post

13 REPLIES 13

I don't believe you ticket the correct answer. I tested this myself, and applying setWorkflow(false) will prevent flows from being triggered.

Kind regards,
Mark
2020 ServiceNow Community MVP
2020 ServiceNow Developer MVP

---

LinkedIn
Community article list

Hi Mark,

Can you please share which instance version you are referring and which additional configuration?

I can test the same and confirm for Orlando version as the question is for Orlando version.

Just to be on same page.

Regards
Ankur

Hi Mark,

My team lead says it's not working! I will try this myself today and marked the correct answer. 

Thanks again!

 

JLeong
Mega Sage

Hi Guys,

In Orlando patch 7 which I am currently using, the setWorkflow(false) doesn't stop the flow. However, when I tried in Paris, it works!

Thank you again!