logo

NJP

Share Knowledge Article - Widget

Import · Jul 20, 2018 · article

I've developed a very friendly widget to share articles with other users from the platform. It works in the Portal as well as in the UI/Console

image

[Portal View]

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 to be tweak if your Portal is different than "sp")
  6. IT sends an email notification to the users selected

Technical Specifications:

  • Widget [Share Article]: Portal widget using Angular and sn-record-picker. This widget must be added to the kb_article page in the Portal.
  • UI Page [shareArticle]: UI/Console widget using Angular and and sn-record-picker. The widget becomes visible by clicking a button on the toolbar of the article displayed.
  • Script Include [shareArticleUtilClient]: Created a record in the [u_share_article] table in order to trigger the email notification with all the information required.
  • Table [u_share_artcile]: Records all the information needed to be send via email. I did not find any other way to send email without a table.
  • UI Script [KBViewArticle]: I've modified lines of code to add the event "shareArticleHandler" that opens the GlideOverlay dialog.
  • UI Macro [kb_view_common_header_toolbar]: I've modified this to include a "Share Article" button.

image

[Console View]

Leave your comments and feedback.

View original source

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