The CreatorCon Call for Content is officially open! Get started here.

Is it safe to use sn_fd.FlowAPI.cancel(now_GR.getUniqueValue(),'Cancelling test flow')?

Ankita Kolhe
Tera Contributor

Hi Community,

Using the below code on sc_req_item UI action so that flow designer gets cancels for current RITM. But I'm bit concerned if it has any side effects like if it interrupts any other flow or ritm. Is it safe to use below code?

Please help me with the same.

var now_GR = new GlideRecord("sys_flow_context");

now_GR.addQuery("name", "Test Flow");

now_GR.query();

 

while (now_GR.next()) {

sn_fd.FlowAPI.cancel(now_GR.getUniqueValue(), 'Canceling Test Flows');

Thanks,

Ankita

1 ACCEPTED SOLUTION

Maik Skoddow
Tera Patron
Tera Patron

Hi

I think you took the code from https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0959612.

I also have used that code and it has worked fine for me without any side-effects.

Maik

View solution in original post

1 REPLY 1

Maik Skoddow
Tera Patron
Tera Patron

Hi

I think you took the code from https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0959612.

I also have used that code and it has worked fine for me without any side-effects.

Maik