Add a custom button to the Agent Workspace Lists page that returns list information in the current view. Define the information to return by adding client GlideList API methods to an action assignment.

Before you begin

Role required: admin

GlideList API methods are provided in the Action Assignments [sys_declarative_action_assignment] List Action view. You can add GlideList functionality to a custom button in the Workspace Experience UI. You can use the button to apply a GlideList method to the current view. Use the GlideList methods to manage table lists by getting list view details, setting filters, sorting by column, and more.

Procedure

  1. Navigate to All > Workspace Experience > Actions & Components > List Actions.
    If you are using getFixedQuery(), navigate to Related List Actions instead of List Actions.
  2. Create a new action assignment by selecting New.
  3. In the Action label field, type a button label.
  4. Type a name into the Action name field.
    Providing text in this field ensures that you can add multiple buttons to the view.
  5. From the Implemented as menu, select Client Script.
  6. Right-click in the form header and select Save.
  7. Select Advanced View.
  8. Select the Client Script tab and add one or more method calls into the onClick{} method definition.
    This method defines what actions to take when the button is selected. For a list of available methods, see GlideList (Now Experience).
    GlideList method calls in the Client Script field.
  9. Select Update.
    You can test your button in a Workspace Experience table list view.
    Note: If the button uses the getFixedQuery() method, select the tab on a record in a Workspace Experience list to test your button.
    The following table illustrates successful button implementation in the Agent Workspace Incidents (All) table. The button implements the GlideList addFilter() method to display only active records.
    Table 1. Example button action applying a filter to a list
    List before clicking List after clicking
    Before selecting the button, an assortment of active and inactive (closed) records display in the view.

    List displayed before the user selects the button to view active records.

    Selecting the button filters the view to display only active records.

    List displayed after the user selects the button displaying only active records.