
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 09:05 AM
This is a new thread created to properly separate this issue. Solution has been provided by Pradeep Sharma
Does anybody know how to implement the [Show Workflow] UI Action for an application?
I used the method described above and I get the following error:
Workflow undefined, maybe missing global qualifier
The error is caused by the UI Action condition:
!current.isNewRecord() && (new Workflow().hasWorkflow(current))
I think it has to do with the scope of the application and the fact that Workflow is not accessible from there.
SOLUTION:
Change the UI Action condition to:
!current.isNewRecord() && (new global.Workflow().hasWorkflow(current))
Change the UI Action script to:
// Show the workflow context in a new window
function showWorkflowContext() {
var id = g_form.getUniqueValue();
var url = new GlideURL('context_workflow.do');
url.addParam('sysparm_stack', 'no');
url.addParam('sysparm_table', g_form.getTableName());
url.addParam('sysparm_document', id);
var w = getTopWindow();
w.popupOpenFocus(url.getURL(), 'show_workflow_context', 950, 700, '', false, false);
}
Solved! Go to Solution.
- 6,480 Views

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-29-2015 09:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-07-2020 10:15 PM
Thanks a lot for posting the solution.
Regards,
Snehal