logo

NJP

Share Knowledge Article (Widget) v2

Import · Oct 16, 2020 · article

A new version of the Share Knowledge Article that is compatible with Orlando and Paris.

Features:

  1. Copy the article's URL
  2. Choose multiple users from [sys_user] table
  3. Delete users from the bucket list
  4. May include a custom message (this is simple plain text)
  5. Can select to share Portal or UI/Console URL (this requires a tweak if your Portal is different than "sp")
  6. IT sends an email notification to the users selected

Components & Artifacts

Component Type Description
u_share_article Table New table extended from Import Set Row accessible from All Application Scopes that can Read, Create, Update and Delete
Share Article Email Notification Notification that is send to recipients. Only internal users from sys_user table.
kb_article_link Email Notification Script Script to build the URL of the Knowledge Article for UI/Console or Portal target.
shareArticle UI Page UI/Console Widget Built as an Angular application containing GlideAjax calls to save records in the u_share_article table in order to trigger the Email Notifcation
shareArticleUtilClient Script Include Script used by GlideAjax to parse data from UI Page and create records in the u_share_article table.
KBViewArticle UI Script OOB script modified to accommodate a click event to open the UI/Console Widget (UI Page) from the Knowledge Article view.
kb_view_common_header_toolbar UI Macro OOB macro modified to place a "Share Article" button to open the dialog containing the UI Page.
share_article Portal Widget Service Portal Widget containing GlideAjax calls to save records in the u_share_article table in order to trigger the Email Notifcation
sys_scope_privilege Cross-Scope Privileges Permissions granted to the Knowledge Management - Service Portal scoped application to the following tables: u_share_article - create sys_attachment - read live_profile - read sys_user - read
db_image Images image

Custom Table vs Exempt Table

As per the ServiceNow Subscription Model, after March 2019 contains platform capacity for customizing and/or extending the ServiceNow applications. In other words ServiceNow will charge more for custom tables; however ServiceNow encourage customers to use exempt tables instead of creating new custom tables from scratch.

Exempt tables are excluded from the custom table count. Any of exempt tables can be extended up to 1,000 times. And an exempt table that has been extended remains an extended table.

Import Set Row [sys_import_set_row] is an exempt table.

For more information about the subscription model:

Custom Table Guide

ServiceNow Subscription Model

Knowledge Management - Service Portal

Now that Knowledge Management is a scoped application for Service Portal, the Share Article Widget must be placed within the same scope and some Cross-Scope Privileges are required in order to run all the logic of the Widget.

The Share Article Widget must be manually added to the Service Portal Page called "Knowledge Article View [kb_article_view]" after deploying the Share Article update set provided in this post. Just add the widget using the Page Editor in the Service Portal Configuration.

Application Module for Administrators

Now you will have a new application module with all the artifacts created or modified to easily fix or update in order to accommodate your own custom requirements. This is only visible for Administrators.

image

Please mark this as helpful if you find it useful.

Cheers!

Oscar Lopez

@oslovanet

View original source

https://www.servicenow.com/community/now-platform-articles/share-knowledge-article-widget-v2/ta-p/2323709