Creating the Knowledge article using scripts
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2024 11:01 PM
Creating the Knowledge article using scripts
2 REPLIES 2
Community Alums
Not applicable
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2024 11:21 PM
Hi @Community Alums ,
Please refer below script this will helps you
var gr = new GlideRecord('kb_knowledge');
gr.initialize();
gr.short_description = 'KB Article from Script';
gr.insert();
Result
Please mark my answer correct and helpful if this works for you
Thanks and Regards
Sarthak
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-10-2024 11:41 PM
Hi @Community Alums ,
The below script will create new knowledge article:
var grKnowledge = new GlideRecord('kb_knowledge');
grKnowledge.initialize();
grKnowledge.setValue('kb_knowledge_base', 'a7e8a78bff0221009b20ffffffffff17'); //Knowledge base - 'IT'
grKnowledge.setValue('kb_category', 'f23c6552ff0131009b20ffffffffffa9'); //Category - 'IE'
grKnowledge.setValue('valid_to', '2024-06-10');
grKnowledge.setValue('short_description', 'Knowledge Article created by Script');
grKnowledge.setValue('text', 'This is article body');
grKnowledge.insert();
Created article:
Please accept my solution if it works for you and thumps up to mark it as helpful.
----------------------------------------------------------------
Mark this as Helpful / Accept the Solution if this helps.
Mark this as Helpful / Accept the Solution if this helps.