Show Flow context UI action
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-13-2024 03:19 AM
In a custom application form i have created an flow designer for it and i need to see the flow of it when a tickets is raised inside that application form so once it is clicked i need to see the conditions running and what is the flow
i have tried by using this code
function showFlowContext () {
var url = new GlideURL('catalog_flow_context.do');
url.addParam('sysparm_sys_id', g_form.getUniqueValue());
url.addParam('sysparm_ck', g_form.getValue("sysparm_ck"));
g_navigation.open(url.getURL(), "_blank");
}
but this didn't work and also i have tried the other way where we can configure through ajax call and script include
function showFlowContext() {
var id = g_form.getUniqueValue();
var ga = new GlideAjax('AjaxUtils');
ga.addParam('sysparm_name', 'getFlowContext');
ga.addParam('sysparm_id', id);
ga.getXMLAnswer(getValue);
function getValue(response) {
var answer = JSON.parse(response);
if (answer["success"] == "true") {
g_navigation.open('/$flow-designer.do#/operations/context/' + answer.id, "_blank");
}
}
}
var AjaxUtils = Class.create();
AjaxUtils.prototype = Object.extendsObject(global.AbstractAjaxProcessor, {
getFlowContext: function(){
var id = this.getParameter('sysparm_id');
var ctx = new GlideRecord("sys_flow_context");
ctx.addEncodedQuery("source_table=table_name_here^source_record="+id);
ctx.query();
if(ctx.next()){
var results = {
"success":"true",
"id":ctx.getUniqueValue()
};
return JSON.stringify(results);
}
gs.addErrorMessage("Flow Context does not exist for this record.");
var results = {
"success":"false"
};
return JSON.stringify(results);
},
type: 'AjaxUtils'
});
So these codes are also didn't work for me
Is there any other way to solve this issue.
here are the attachments below .
0 REPLIES 0