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

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

Hi Mohit

Thank you for your response,

I have followed the steps you indicated, however when I click on the button to view the workflow in the workspace, nothing happens.

Do you know what could be happening?

find_real_file.png

hello 
@Alessa you would have to do it in workspace client script .

The above one is for normal native view code 

try adding  the code that i gave in workspace client script like below 

find_real_file.png

 

Hello Mohith:

I did everything you pointed out however it does not work, the "show workflow" button in the workspace does nothing. Do you know what could be happening?

find_real_file.png