Oscar Lopez
Mega Guru
Mega Guru

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

ComponentTypeDescription
u_share_articleTableNew table extended from Import Set Row accessible from All Application Scopes that can Read, Create, Update and Delete
Share ArticleEmail Notification Notification that is send to recipients. Only internal users from sys_user table.
kb_article_linkEmail Notification Script Script to build the URL of the Knowledge Article for UI/Console or Portal target.
shareArticleUI 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

shareArticleUtilClientScript IncludeScript used by GlideAjax to parse data from UI Page and create records in the u_share_article table.
KBViewArticleUI ScriptOOB script modified to accommodate a click event to open the UI/Console Widget (UI Page) from the Knowledge Article view.
kb_view_common_header_toolbarUI MacroOOB macro modified to place a "Share Article" button to open the dialog containing the UI Page.
share_articlePortal WidgetService Portal Widget containing GlideAjax calls to save records in the u_share_article table in order to trigger the Email Notifcation
sys_scope_privilegeCross-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_imageImages find_real_file.png

 

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.

find_real_file.png

 

Please mark this as helpful if you find it useful.

 

Cheers!

Oscar Lopez

@oslovanet

Comments
Hafsa1
Mega Sage

@Oscar Lopez Is it possible to add a button "Share Article" in somewhere  bottom of page Knowledge Article View [kb_article_view]? And when clicked on it it will open the dialog containing the UI Page.

Oussama Aziane
Tera Contributor

Thank you so much @Oscar Lopez ! 

I have an issue , when i click on share article in the portal it works correctly but in the back office the field for selecting user is not displayed as you can see in the screenshot below

does someone have an idea about this issue ? 

Thanks in advance !

Community share article isssue.png

vidhya_mouli
Giga Sage

Thank you for this post. I modified your widget to share our newsletters with customers.

Version history
Last update:
‎10-16-2020 03:17 PM
Updated by: