Template pop up in knowledge article

anvitha ash
Tera Contributor

Hi,

 

When you select any Knowledge Base, a pop up appears to Apply Default Values "Do you want to populate fields with the default values for the selected knowledge base as follows?"

anvithaash_0-1767385834343.png

I am setting the default values from the knowledge base to the knowledge article field "ownership group"

 

Now, i don't want the popup to be displayed and ask for the button to click "cancel" or "ok". The field values needs to be set automatically from the knowledge base to knowledge article without showing the pop display

 

The pop up is a UI Page, page name: "kb_confirm_defaults"

link to page: /nav_to.do?uri=sys_ui_page.do?sys_id=1fb56b13ff0131003f07ffffffffffdd

 

How can we achieve this functionality

 

Thanks in advance😀

6 REPLIES 6

Matthew_13
Kilo Sage

Hi

You can’t disable the popup directly, but you can achieve the same user experience by auto-applying the defaults yourself in a client script. 

 

I suggest u do:

  • Add an onChange client script on the Knowledge Base field

  • When the KB changes, call a GlideAjax Script Include

  • Read the default values from the selected Knowledge Base

  • Automatically set the article fields ownership group using g_form.setValue()

@anvitha ash  - Please mark as Accepted solution and Thumbs Up if you find Helpful!!

@Matthew_13 ,

 

So you want me to write a on change client script on knowledge base table or knowledge table ?and how does on change satisfy our requirement. do we need to write onload instead?

Put the client script on the Knowledge Article form (kb_knowledge), not on the Knowledge Base table.

Use an onChange client script on the Knowledge Base field because your requirement is triggered when the user selects or changes the KB. That’s the exact moment you want to pull the defaults and set the fields automatically.

You generally don’t need onLoad unless:

  • You’re creating a new article and the KB is already pre-filled when the form opens

In most cases:

  • onChange → handles user selecting/changing the KB

  • onLoad (optional) → handles preselected KB on new records

That’s why onChange satisfies the requirement and avoids the popup.

 

@anvitha ash  - Please mark as Accepted solution and Thumbs Up if you find Helpful!!

@anvitha ash - Did this help you my freind?