Service Portal Knowledge search displaying attachment link 


To download an attachment directly for the search page while searching for a knowledge article or text file contained in a knowledge article, which is similar in functionality to $, follow the steps below to configure the Search Page widget and Search source to display the attachment.


Adding spAttachmentManager directive to Search Page widget

  1. Navigate to Service Portal > Widget
  2. Search for a widget named Search Page, the widget handling the searching
    Link: https://<yourInstance>
  3. In the Related list in the bottom of the page, click Edit in the Angular Providers tab.
  4. Search for spAttachmentManager and add it to the page.

Note: The search page does not need to be cloned to add the Angular Providers.

Using the spAttachmentManager directive in the Knowledge Search source

  1. Navigate to Service Portal > Portal
  2. Search for the Portal record to configure this feature. If using out of box portal, search for the record Service Portal
  3. In the related list, open the search source called Knowledge Base
    Link to the OOB Search Source: https://<yourInstance>
  4. Add the following piece of code to the Search page template to use the spAttachmentManager directive: 
    <sp-attachment-manager table="'kb_knowledge'" sys-id="item.sys_id" omit-edit="true"></sp-attachment-manager>

Knowledge Search Source code demonstration


Article Information

Last Updated:2019-05-21 11:37:58
Adding spAttachmentManager to the widget.pngSearch source with spAttachmentManager .pngSearch source with spAttachmentManager .pngService Portal attchment search.png