How to exclude all order guides from Service Operation Workspace

Sandeep D V
Tera Contributor

We have a requirement to exclude all order guides from the Service Operations Workspace.

Currently, the out-of-the-box functionality displays both catalog items and order guides when we click on the 'Create Request' UI action on the Interaction form in the Service Operations Workspace. However, our requirement is to display only catalog items, excluding order guides, in the Service Operations Workspace.

How can we achieve this customization?

UI Action Script:

function onClick() {
    var result = g_form.submit('sysverb_ws_save');
    if (!result) { // failed form submission
        return;
    }
    result.then(function() {
        var params ={};
        params.sysparm_parent_table = "interaction";
        params.sysparm_parent_sys_id = g_form.getUniqueValue();
        g_service_catalog.openCatalogItem('sc_cat_item', '-1', params);
    });
}
19 REPLIES 19

Ankur Bawiskar
Tera Patron
Tera Patron

@Sandeep D V 

did you check the OOB ui action how it's being invoked?

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Sandeep D V 

you can try this

1) create a user criteria with advanced script something like this

if (gs.action.getGlideURI().toString().indexOf('/now/sow/record/') > -1)
    answer = false;
else
    answer = true;

2) then add this user criteria in Available for related list of that user criteria

This you will have to do for each order guide if it works for 1

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader

@Ankur Bawiskar 
I tried with your solution but it's not working.

@Sandeep D V 

did you add log and see it went inside the IF?

Regards,
Ankur
✨ Certified Technical Architect  ||  ✨ 9x ServiceNow MVP  ||  ✨ ServiceNow Community Leader