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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

View solution in original post

13 REPLIES 13

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

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

@JLeong 

Thanks for marking my response as helpful.

Let me know if I have answered your question.

If so, please mark my response as correct & helpful so that this thread can be closed and others can be benefited by this.

Regards
Ankur

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Hi @Ankur Bawiskar 

 

So now will the statement, 'gr.setWorkflow(false);' can stop the flow which is execution for the gr record?

Could you please update on this?

Mark Roethof
Tera Patron
Tera Patron

Hi there,

Did this solve your question? Or do we need to follow-up on this?

Please mark this answer as correct if it solves your question. This will help others who are looking for a similar solution. Also marking this answer as correct takes the post of the unsolved list.
Thanks.

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

---

LinkedIn
Community article list

 

Kind regards,

 

Mark Roethof

Independent ServiceNow Consultant

10x ServiceNow MVP

---

 

~444 Articles, Blogs, Videos, Podcasts, Share projects - Experiences from the field

LinkedIn

JLeong
Mega Sage

Thanks Mark and Ankur!!!

Appreciate your time and help!