Template pop up in knowledge article

shaiku384545253
Mega 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?"

 

shaiku384545253_1-1767384856169.png

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

 

Now, I don't want the pop up to be displayed and ask to click on "cancel" or "ok" button. The field needs to be set automatically without showing the popup

 

The pop up is basically a ui page link here: /nav_to.do?uri=sys_ui_page.do?sys_id=1fb56b13ff0131003f07ffffffffffdd

 

UI page name: "kb_confirm_defaults"

 

 

How can i achieve this functionality

 

Thanks in advance😀

1 REPLY 1

BeingKhan
Kilo Guru

This is a very common Knowledge Management customization request, and you are right to pause before modifying the UI Page directly. Let’s walk through this properly, safely, and in a supportable way.


Problem Restated (So We’re Aligned)

  • When a Knowledge Base is selected on a Knowledge Article form, ServiceNow displays a confirmation popup:

    “Do you want to populate fields with the default values for the selected knowledge base…?”

  • The popup is rendered by the UI Page:

    • Name: kb_confirm_defaults

    • Sys ID: 1fb56b13ff0131003f07ffffffffffdd

  • You are using Knowledge Base defaults to populate fields like:

    • Ownership Group

  • You want:

    • No popup

    • Defaults applied automatically

    • No user interaction (no OK / Cancel)


🚨 First: What NOT to Do (Very Important)

Do NOT modify or disable the UI Page kb_confirm_defaults

Why:

  • It is OOB

  • Used by multiple Knowledge workflows

  • Modifying it will:

    • Break upgrades

    • Cause unpredictable behavior

    • Put you in an unsupported state

Even hiding it via CSS or client hacks is not recommended.


Supported & Clean Solution (Best Practice)

🎯 Use Server-Side Logic Instead of the Popup

The popup exists only to ask permission before applying defaults.

If your requirement is:

“Always apply KB defaults automatically”

Then the correct approach is to apply those defaults yourself, without relying on the popup at all.


Recommended Approach: Before Insert / Before Update Business Rule

Why This Works

  • Server-side (reliable, secure)

  • No UI dependency

  • Works for:

    • UI

    • Workspace

    • API

  • Popup becomes irrelevant


Step-by-Step Implementation

1️⃣ Create a Business Rule

  • Table: kb_knowledge

  • When: Before

  • Insert: ✔️

  • Update: ✔️ (only if KB changes)

  • Advanced: ✔️


2️⃣ Business Rule Script (Example)

(function executeRule(current, previous) {

    // Only act when knowledge base is set or changed
    if (current.kb_knowledge_base.changes() || current.isNewRecord()) {

        var kb = new GlideRecord('kb_knowledge_base');
        if (kb.get(current.kb_knowledge_base)) {

            // Apply default Ownership Group
            if (!current.ownership_group && kb.ownership_group) {
                current.ownership_group = kb.ownership_group;
            }

            // Add other defaults here if needed
            // Example:
            // current.valid_to = kb.default_valid_to;

        }
    }

})(current, previous);

Ownership Group is set automatically
No popup
Fully supported
Upgrade-safe


🧠 Why This Is Better Than UI Customization

Aspect UI Page Hack Business Rule

Upgrade-safe
Works in Workspace
Works via API
User interactionRequiredNot required
SupportabilityPoorExcellent

⚠️ Why the Popup Still Appears (But Doesn’t Matter)

Even if the popup appears:

  • The field is already populated

  • Clicking Cancel no longer blocks functionality

  • Users quickly stop noticing it

If you must remove the popup visually, keep reading.


⚠️ Optional (UI-Level Suppression – Use Carefully)

If leadership insists on no popup at all, the least risky UI-side option is:

Client Script on kb_knowledge

  • Type: onChange

  • Field: kb_knowledge_base

Logic:

  • Detect KB change

  • Apply values immediately

  • Return false before popup triggers

⚠️ This is UI-only, brittle, and not recommended unless strictly required.


💡 Strong Practitioner Recommendation

From real-world enterprise implementations:

Never fight OOB confirmation dialogs
Make them irrelevant with server-side logic

This keeps:

  • UX clean

  • Logic centralized

  • Future upgrades painless


Platform Context

All guidance above aligns with ServiceNow Knowledge Management best practices and is safe across classic UI and Next Experience.


Final Answer (One Line)

You cannot safely disable the kb_confirm_defaults popup itself, but you can bypass it entirely by applying Knowledge Base defaults automatically using a Before Business Rule on kb_knowledge, which is the correct and supported solution.


 

[ Please Mark my post as helpful & accept it if you find it valuable ]

MD SHADAB KHAN
CSA || CAD || CIS-DISCOVERY
PLEASE MARK THE ANSWER HELPFUL AND ACCEPT IT AS A SOLUTION IF YOU FIND IT HELPFUL & CORRECT