I want to be able to display a workflow in a Workspace.

Alessa
Mega Guru

Hello dear community I need help:

I need in the workspace to be able to display the workflow (just like in a request within the Service Now platform).

Ej: We select this on the platform:

find_real_file.png

To display the workflow:

find_real_file.png

In order to do this in the workspace I did the following:

I selected: Workspace form button and Format for configurable workspace

find_real_file.png

The button appears in the workspace, but nothing happens when you click it:

find_real_file.png

 

I need to select the "Show workflow" button to display the workflow. Can someone help me to solve this?

Thanks in advance

1 ACCEPTED SOLUTION

Mohith Devatte
Tera Sage
Tera Sage

hello @Alessa ,

try putting this script in workspace client script

function onClick(g_form) {
// Show the workflow context in a new window

    var url = new GlideURL('/context_workflow.do');
    url.addParam('sysparm_stack', 'no');
    url.addParam('sysparm_table', 'sc_req_item');
	url.addParam('sysparm_document', g_form.getUniqueValue());
	g_navigation.open(url.getURL(), "_blank");

}

Hope this helps 

please mark my answer correct if this helps you

View solution in original post

12 REPLIES 12

I did everything you said but for some reason the "Show workflow" button is not working 😞

 

find_real_file.png

Hello Alessa,

 

Use the following instead in the Workspace Client Script field.  This is based on logic in the 'Show Workflow' UI Action for the Removal Candidate [samp_sw_reclamation_candidate] table.

 

 

function onClick(g_form) {
var document = g_form.getUniqueValue();
var url = '/context_workflow.do?sysparm_stack=no&sysparm_table=sc_req_item&sysparm_document=' + document;
open(url, '_blank');
}

Community Alums
Not applicable

Hi Mike,

 

This works. Thank you!