- Post History
- Subscribe to RSS Feed
- Mark as New
- Mark as Read
- Bookmark
- Subscribe
- Printer Friendly Page
- Report Inappropriate Content
on 02-19-2021 01:53 AM
Hello Everyone,
In this article, I will discuss about the Delete button on List view for Agent Workspace/Portal similar to native.
Purpose
OOB delete button is not present on list view because agent workspace have their own List Action buttons for the list view
Procedure
1.Navigate to Workspace Experience > Actions & Components > List Actions and click New.
2.On the form, fill in the fields.
Field | Description |
---|---|
Action label | Name of the list action. like Delete. |
Action name | Name that describes what you're adding. |
Implemented as | Action type. Select Server script. |
Button type | Primary green button, such as New in the following image. The secondary button is gray. |
Tooltip | Text that displays when an agent points their mouse at the icon. |
Description | Short description of this component. |
Application | Application that this component applies to. Global means that the component applies to all applications. |
Workspace | Workspace that this component belongs in, for example, Agent Workspace, ITSM, CSM, and so forth. |
Table | Table that this component is tied to. When a record from this table is open, this list action appears. |
View | Set of visual configurations. This value is typically Workspace. |
Active | Toggle to make the icon for this list action appear. |
Order | Integer that governs the placement of this icon in the list of list actions. A lower number means that it is higher in the list. The typical practice is to make these numbers hundreds, for example, 100, 200, 300, and 400, so you can put new icons between existing ones in the future. |
3. After form submission, Under Related Links, click Advanced view.
4. Check the "Record Selection Required" which will ensure that minimum one record is selected and check the "Requires delete access" field to ensure that user have delete access
disabled when no record is selected
5. Add this script(same script of delete UI Action on native) in the server script section
execDelete();
function execDelete() {
if (!current.isValidRecord()) {
gs.log("Not deleting invalid record");
return;
}
if (!current.canDelete()) {
gs.log("Not deleting " + current.sys_id + " because of security constraints");
gs.addInfoMessage(gs.getMessage('Skipping delete of {0} because of security constraints',current.getDisplayValue()));
return;
}
current.deleteRecord();
gs.log("Deleted " + current.getDisplayValue() + " (" + current.sys_id + ")" + " from " + current.getTableName());
}
6.On the Confirmations Settings tab, select the Confirmation Required check box if you want to display a pop-up window that asks the agent to confirm the use of this list action.
- 6,483 Views

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Great article Pranesh,
Were you able to get gs.addinfomessage to work on the list view? I tried it but it doesn't seem to work and can't find anything in the community about it.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
what you mean by the infomessage? is it on list load or on click the button?

- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
In your example script you have the following gs.addInfoMessage
gs.addInfoMessage(gs.getMessage('Skipping delete of {0} because of security constraints',current.getDisplayValue()));
But I noticed list actions do not display informational messages, so I was wondering where this was displaying.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thanks!
On the same topic, would you know how to enable delete from a related list in agent workspace?
Unlike in the platform UI, I don't know how to enable selecting records from here and proceed to delete.
v
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
You can try same steps in Related List actions
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Well that was obvious, thanks!
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
The related list button worked, but how did you manage to make the records in a related list selectable.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Nevermind, needed to check the 'Selection required' checkbox.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Thank you Pranesh!!
This article is a saviour 🙂
Moumita
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi,
On the agent workspace we have multiple list views, For example we have cases.
For that we have views for my group cases, all cases and unassigned cases.
Is it possible to implement the same feature only for the particular view for example unassigned cases.
- Mark as Read
- Mark as New
- Bookmark
- Permalink
- Report Inappropriate Content
Hi Pranesh,
Hope this article is still live 😄
I have a quick question on this, I checked the "Record selection required" for the Related List in Agent workspace.
I have a customized UI action (Client) which triggers a third party integration. How can I reuse the same UI action on the Agent workspace - Related List after selection of the record.
Please let me know.
Thanks in advance..
Regards,
Ram