Autopopulate Field values from Parent KB article to a new KB Article
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI,
I have a requirement ,I want to autopopulate field values from KB Article which is already published to a new created KB Article such as for example.
In a published policy, A KB article is created automatically , Under translated versions , when I click on new button , the new knowledge article record form must autopopulate values such as category , knowledge base from KB Article which is already created.
How can I achieve this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
You can auto-populate the new translation’s form by keying off the “translated from” (source article) relationship and copying fields from the source article.
The most reliable approach is a Before Insert business rule on kb_knowledge that runs when current.translated_from is set: load the source record with a GlideRecord, then set the new record’s kb_knowledge_base (Knowledge Base), kb_category/category (your category field), and any other fields you want to inherit (e.g., topic, keywords).
This guarantees the values are copied no matter how the translation is created (UI, API, or import). For a nicer authoring experience, you can also add an onLoad client script that uses
g_form.getReference('translated_from', function(src){ g_form.setValue('kb_knowledge_base', src.kb_knowledge_base); g_form.setValue('category', src.category); /* etc. */ });So the fields populate immediately when the “New” form opens from the Translated versions related list.
The client script gives instant UI feedback and the server-side rule enforces the inheritance on save.
ɪꜰ ᴍʏ ᴀɴꜱᴡᴇʀ ʜᴀꜱ ʜᴇʟᴘᴇᴅ ᴡɪᴛʜ ʏᴏᴜʀ Qᴜᴇꜱᴛɪᴏɴ, ᴘʟᴇᴀꜱᴇ ᴍᴀʀᴋ ᴍʏ ᴀɴꜱᴡᴇʀ ᴀꜱ ᴛʜᴇ ᴀᴄᴄᴇᴘᴛᴇᴅ ꜱᴏʟᴜᴛɪᴏɴ ᴀɴᴅ ɢɪᴠᴇ ᴀ ᴛʜᴜᴍʙꜱ ᴜᴘ.
ʙᴇꜱᴛ ʀᴇɢᴀʀᴅꜱ
ꜱʀᴇᴇʀᴀᴍ
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
HI @Sreeram Nair
I tried script on "onload" client script .However, its not autopopulating the values.I will give a walkthrough .
1.I created a relationship named translated versions
2.I created a m2m table.
3.I want to autopopulate values from KB article to new created article.
Please refer screenshots for reference.
