Issue with UI action ?

Kiran Kumar 76
Tera Expert

I am trying to add the " search for duplicates" ui action to the workspace

The button is visible, need help to fix the code

KiranKumar76_0-1694322635012.png

 

KiranKumar76_1-1694322673432.pngKiranKumar76_2-1694322714655.png

 

 

1 ACCEPTED SOLUTION

Hi @New Developer_S 

 

below code fixed this

 

function onClick(g_form) {
    var sd = g_form.getValue('short_description');
    var url;
    url = "knowledge_home_launcher.do?sysparm_stack=no&query=" + sd;
    var win = top.window.open(url, '_blank');
    win.focus();
}

View solution in original post

6 REPLIES 6

New Developer_S
Giga Sage

@Kiran Kumar 76 

Search for Duplicates UI Action ,Searches existing articles for duplicate content based on Short description, category, and topic etc.

Check your UI action Onclick defnition  , For example ,I am giving you the sample code here. you can modify the code according to your requirement. 

NewDeveloper_S_0-1694324631931.png

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

Hi @New Developer_S 

 

What i see is you posted same script in the UI action,i have done that please look into workspace client script 

New Developer_S
Giga Sage

For customers switching over to Agent Workspace, Client Scripts will not work the same the way as it works in native UI.

The client scripts needs to modified so that they work the same way in native UI & Workspace.
1. Open the client script which is not working in Workspace.

2. Select the UI Type field, and set the value to All

 

Also please refer the Knowledge Article if not already referred.

 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0694100

 

if my answer has helped with your question, please mark my answer as accepted solution and give a thumb up.

Hi @New Developer_S 

There is no client script here to select UI type ALL ,  ,can you give me the client script running behind this where i can set UI type