Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Show Flow URL does not link to executed flow

Gsen47
Tera Contributor

 I'm creating changes from a 3rd party vendor using an API call. The 'Show Flow' URL is getting created, but it is not getting related to the flow where the API was executed.

 

Screenshot #1 is the URL created

#2 is what opens 

#3 is the actual execution that created the CHG, but it is NOT getting linked to my change.

1 REPLY 1

Gsen47
Tera Contributor

Ended up building the URL and adding it to the Work Notes.

Grabbed the flow ID:

var contextId = FlowScriptAPI.getContextID();
return contextId;

Created link:

var sys_id = fd_data.flow_var.flow_context_id;
var url = GlideURL("/$flow-designer.do?/sysparm_nostack=true#/operations/context/" + sys_id + "&tableName=sys_flow_context");
var decodedUrl = decodeURIComponent(url);
var link = "Show Flow Link created: ";
var t1 = '[code]<a href="'+decodedUrl+'">Link to Flow</a>[/code]';
return link + ' ' + '\n' + t1;