How to create this knowledge base choice screen?

hurm
Tera Contributor

Hi ALL

I would like to switch to this screen with a button on the knowledge list screen.

I don't know about this screen, so I started researching. I have to judge whether it can be used or not depending on the contents of the investigation.

 

The function of this screen is: You can select a knowledge base and then move to the knowledge screen, but I don't know what it is made of.

Also, when I inspect "Create new article" in the navigation, it is not displayed. I checked with the list of record producers and it wasn't there.

 

Does anyone know how to create this functionality?

Please help me

zhian_0-1681717329165.png

 

 

2 REPLIES 2

Rahul Kumar17
Tera Guru

Hi,

 

It sounds like you are trying to create a button on the knowledge list screen that allows you to select a knowledge base and move to the knowledge screen.

To do this, you will need to create a UI Action on the knowledge list screen. A UI Action is a button or link that performs a specific action on a record or list of records.

To create the UI Action:

  1. Go to the Knowledge List screen and click the gear icon in the upper right corner.
  2. Select "Configure" and then "UI Actions".
  3. Click "New" to create a new UI Action.
  4. Enter a name for the UI Action, such as "Select Knowledge Base".
  5. In the "Table" field, select "Knowledge".
  6. In the "Action name" field, enter a name for the action, such as "select_kb".
  7. In the "Onclick" field, enter the JavaScript code that will launch the knowledge screen with the selected knowledge base. Here is some sample code to get you started:

var kb = g_form.getValue('kb_knowledge_base');
if (kb) {
gs.navigateTo(new GlideURL('kb_list.do?sysparm_query=kb_knowledge_base=' + kb));
}

 

This code gets the value of the "kb_knowledge_base" field on the current record and then navigates to the knowledge list screen with a query that filters the list by the selected knowledge base.

  1. Save the UI Action and test it out on the knowledge list screen.

As for the "Create new article" navigation item not being displayed, it is possible that it has been removed or hidden from the navigation menu. You can check the "Navigation" module in the ServiceNow Studio or "System UI > Navigation" module to see if it is still available and make any necessary changes.

 

Thanks,

Rahul Kumar

If my response helped please mark it correct and close the thread.

Thanks,
Rahul Kumar

Hi @Rahul Kumar17 
Thank you for answering
I tried to create it according to the answer, but I could not move to the knowledge list screen with the button. is there something wrong with the settings

Is it the default function of the knowledge list screen Service now?

 

截屏2023-04-17 23.27.24.png

截屏2023-04-17 23.27.49.png