- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 01:44 AM
I want to create UI macro and when user clicks on it, it should create a knowledge base article.
Please suggest your expertise.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 01:48 AM
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button id="button" onclick="kbCreate();">Post Knowledge</button>
<script>
function kbCreate(){
var gr= new GlideRecord('kb_knowledge'); gr.initialize();
gr.short_description = g_form.getValue('incident.short_description'); gr.text=g_form.getValue('incident.description');
gr.insert();
}
</script>
</j:jelly>
After creating this UI macro, write this line in the dictionary attributes of the incident reference field:
ref_contributions=create_kb
Please mark it as helpful if it solves your issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-26-2024 01:48 AM
<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<button id="button" onclick="kbCreate();">Post Knowledge</button>
<script>
function kbCreate(){
var gr= new GlideRecord('kb_knowledge'); gr.initialize();
gr.short_description = g_form.getValue('incident.short_description'); gr.text=g_form.getValue('incident.description');
gr.insert();
}
</script>
</j:jelly>
After creating this UI macro, write this line in the dictionary attributes of the incident reference field:
ref_contributions=create_kb
Please mark it as helpful if it solves your issue.