Add "View Workbench" button to Service Operations Workspace

patrykprejs
Tera Contributor

Hi All,

 

I am wondering if I am missing something but I am trying to add the existing "View Workbench" button that you get on an Incident within the Default view to the Service Operations Workspace.

 

I does appear in the CSM Workspace but not in the other one, which is what I would need.

 

Example of what it looks like in the CSM Workspace and what I am trying to get working in the SOW Workspace.

patrykprejs_2-1708944447685.png

 

 

I expected this to be as simple as changing the UI Action and selecting the "Workspace Form Button" but it has not done it for this particular UI Action.

 

Please see the screenshots and the code below, if anyone could help me out it would be greatly appreciated.

 

patrykprejs_0-1708943758776.png

 
Complete Script below: 
 
function openMIMWorkbench() {
    var url = "/$major_incident_workbench.do?sysparm_stack=no&sysparm_sys_id=" + g_form.getUniqueValue();
   
   
    var isPolarisEnabled = isPolaris();
    if (isPolarisEnabled) {
        var polarisPrefixUrl = "/now/nav/ui/classic/params/target/";
        var query = "/$major_incident_workbench.do?sysparm_stack=no&sysparm_full_theme_support=true&sysparm_use_polaris=true&sysparm_sys_id=" + g_form.getUniqueValue();
        query = encodeURIComponent(query);
        url = polarisPrefixUrl + query;
    }
   
    var gsftFrame = parent.document.getElementById('gsft_main');
    if(!gsftFrame)
            gsftFrame = parent.document.getElementById('testFrame');
    if (gsftFrame) {
        var gsftWindow = gsftFrame.contentWindow || gsftFrame.contentDocument;
        gsftWindow.location = url;
    }
    else {
        parent.location = url;
    }
}
 
patrykprejs_1-1708943869628.png

 

1 ACCEPTED SOLUTION

Gustav Aldenbra
Kilo Sage

Hi @patrykprejs 

 

Go to UX Form Action Configs and select Sow Action. then create a new Action Layout item. In the new record select action type 'action' and create a new action and select the UI action you want. Be sure to select the correct table when creating the Action Layout item.

View solution in original post

4 REPLIES 4

Dr Atul G- LNG
Tera Patron
Tera Patron

Hi @patrykprejs 

 

I think you need to add the UX Action list as well. 

 

https://docs.servicenow.com/bundle/washingtondc-platform-user-interface/page/administer/workspace/ta...

*************************************************************************************************************
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.

Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]

****************************************************************************************************************

Thank you for the comment @Dr Atul G- LNG, this time round another one resolved this for me but as always appreciate it!

 

And it made me add to my Workspace Knowledge!

 

Regards,

Patryk

Gustav Aldenbra
Kilo Sage

Hi @patrykprejs 

 

Go to UX Form Action Configs and select Sow Action. then create a new Action Layout item. In the new record select action type 'action' and create a new action and select the UI action you want. Be sure to select the correct table when creating the Action Layout item.

Hi @Gustav Aldenbra,

 

Thank you very much, simple yet not simple enough for me to figure it out by myself! 

 

Regards,

Patryk