Want to show KB article in pending retirement state on portal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 05:57 AM
Hi Community,
How can we show KB article in pending retirement state on portal ?
Please guide.
I already had tried making change in the Search Source used in my portal , but no luck.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 06:05 AM - edited ‎10-02-2024 06:07 AM
To display Knowledge Base (KB) articles in a "Pending Retirement" state on the ServiceNow portal, follow these steps:
Step 1: Verify KB Article State
- Check the Article: Ensure the articles are in the "Pending Retirement" state.
Step 2: Modify Search Source
Access Service Portal: Navigate to Service Portal > Portals and open your portal.
Edit Search Source: Go to Service Portal > Search Sources and modify the relevant source. Ensure the script var gr = new GlideRecord('kb_knowledge');
gr.addQuery('state', 'pending_retirement');
gr.query();Step 3: Customize the Widget
Find the Widget: Go to Service Portal > Widgets and locate the one displaying KB articles.
Edit Widget Code: Adjust the server script to include "Pending Retirement" articles:
Step 4: Clear Cache
- Clear the cache via System Maintenance > Cache > Clear Cache.
Step 5: Test
- Visit your Service Portal to confirm that the articles appear.
if you found this helpful please accept as solution and mark helpful
best
Chetna
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-02-2024 10:29 AM
Hi @Chetna_dev ,
Thanks for your response.
Will you please guide, where exactly in the server script of widget we have to modify code?
Please.