Show Workflow UI action.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2020 10:42 PM
How can we bring the Show Workflow UI action on the incident table?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2020 10:53 PM
HI,
Create UI Action an Incident table:
Name : - Show Workflow
Table :- incident
Onclick:- showWorkflowContext()
condition:- !current.isNewRecord() && (new global.Workflow().hasWorkflow(current))
Script:-
function showWorkflowContext() {
var id = g_form.getUniqueValue().toString();
var url = new GlideURL('context_workflow.do');
url.addParam('sysparm_stack', 'no');
url.addParam('sysparm_table', g_form.getTableName());
url.addParam('sysparm_document', id);
g_navigation.open(url.getURL(), 'show_workflow_context');
}
Mark Correct if this solves your issue and also mark Helpful if you find my response worthy.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-02-2020 10:54 PM
Hello Kalik,
You need to create a UI action 'Show incident workflow'.
Refer the image.
Here is the script.
onClick function: showWorkflowContext();
// Show the workflow context in a new window
function showWorkflowContext() {
var url = new GlideURL('/context_workflow.do');
url.addParam('sysparm_stack', 'no');
url.addParam('sysparm_table', 'incident');
url.addParam('sysparm_document', g_form.getUniqueValue());
g_navigation.open(url.getURL(), "_blank");
}
Hope this will help you.
Regards,
Sagar Pagar