Attaching files to records from portal pages
-
- UpdatedAug 3, 2023
- 6 minutes to read
- Vancouver
- Service Portal Designer
Attachments can be added to records from portal pages by navigating the file system, pasting files from the clipboard, or dragging and dropping files.
By default, several base system widgets accept attachments from portal users using one or more of these methods. To modify how portal users can add attachments, you can clone and edit widgets to customize the file attachment experience as described in the following procedures.
To track how portal users attach files to records from pages in your portal, see the SP File Attach event in User Experience Analytics for Service Portal. For more information about available events, see Service Portal events.
Add attachments by pasting or dropping files
Allow portal users to attach files by pasting or dropping files in the Add attachments dialog box.
Before you begin
By default, the Form, Ticket Attachments, Ticket Conversations, and SC Catalog Item base system widgets support adding attachments by pasting or dropping files in the Add attachments dialog box rather than only by navigating the file system.
To configure this functionality for other widgets, you can clone or create a widget that supports adding attachments with the sp-attachment-button
directive. For more information about cloning widgets, see Clone a widget.
Role required: sp_admin or admin
Procedure
Result
On a page with the widget, you can paste or drop files over the Add attachment dialog box to attach them to the record, as shown in the following example.
Add a drag-and-drop zone for attaching files
Allow portal users to drop attachments in a dedicated zone of a page to quickly attach files to a record.
Before you begin
To configure a drag-and-drop attachments zone on a page, you must clone or create a widget that supports adding attachments by calling attachmentHandler
set to an instance of
nowAttachmentHandler
in its client script. For an example of a widget like this, see the Form widget. For more information about cloning widgets, see Clone a widget.
Role required: sp_admin or admin
About this task
By default, portal users can add attachments on many base system pages by selecting the Add attachments icon () to open the Add attachments dialog box. With a drag-and-drop attachments zone, portal users can add attachments with fewer clicks. For example, you could drop attachments over an area of a catalog
request or a form.

Procedure
Result
On a page with the widget, you can drag one or more selected files over the attachment zone and drop them to attach them to the record.
Add an attachments section to a widget
Allow portal users to paste, drop, or navigate to files in a section of a widget to quickly attach files to a record.
Before you begin
To configure an attachments section in a widget, you must clone or create a widget that supports adding attachments by calling attachmentHandler
set to an instance of nowAttachmentHandler
in
its client script. For an example of a widget like this, see the Form widget. For more information about cloning widgets, see Clone a widget.
Role required: sp_admin or admin
About this task
By default, portal users can add attachments on many base system pages by selecting the Add attachments icon () to open the Add attachments dialog box. With an attachments section, portal users can add attachments with fewer clicks.

Procedure
Result
On a page with the widget, you can paste or drop one or more selected files over the attachment section to attach them to the record.