Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Is it possible to delete the records in the related list in agent workspace

sam55
Tera Contributor

find_real_file.png

 

trying to have this functionality in agent workspace.

 

I have tried these steps mentioned in this article and found that it is for List and not for Related list

https://community.servicenow.com/community?id=community_article&sys_id=64857223dbd6685066f1d9d968961919

 

 

3 REPLIES 3

John Zhang1
Kilo Patron
Kilo Patron

You can add the "Delete" button on HR list view by following this post - 

Delete List button on Agent workspace

 

If my reply is Helpful/Correct, please mark the answer as Helpful/Correct. 

Hi John,

 

Thanks for your response. I have tried these steps and found that it is for the List view and not the Related list.

Community Alums
Not applicable

Hi Sam,

You need to create a new 'Action Assignment' to remove the added records.

Follow these steps:

  1. From the application-navigator, navigate to -- Workspace Experience > Actions & Components > Related List Actions
  2. Create 'New'
  3. Populate the below fields (ensure to be in "Global" application for this operation) >>
    - Action label = Remove ({{count}}) //'count' is optional
    - Action name = remove
    - Implemented as = Server Script (important)
    - Button type = Secondary
    - Table = target table (if 'Global' table is selected, the action will be available in all the related-lists )
    - View = optional (may select 'workspace')
  4. Click on the related-link = 'Advanced View'
  5. Populate these fields >
    - Record Selection Required = true
    - Server Script tab > Server Script = current.deleteRecord();
    - Confirmation Settings tab > Confirmation Required = optional
  6. Press save/update

    Now open the record in Agent Workspace, you should notice the 'Remove' button is disabled in the related-list view, and selecting the records to unlink will enable the button.

find_real_file.png

You can also learn more such actions here too :https://community.servicenow.com/community?id=community_article&sys_id=d56878d5db2de810a08a1ea668961...

Mark my answer correct & Helpful, if Applicable.

Thanks,

Sandeep