Agent Workspace - OOTB Email Client - How to delete a saved draft?

StefanoZ
Mega Sage

Can you please explain me how to add Delete button on OOTB Client Email in Agent Workspace?

I know you can go on Classic in the table and delete them but would be very nice and logic that agents can delete their drafts on AW Side.

Check attached screenshot, delete button does not exists.

1 ACCEPTED SOLUTION

Dominik Simunek
Tera Guru

Hi Stefano,

I have not found so far a way how to add "delete" button directly into the Email Draft form view as it seems it uses some special view. Even "Save as Draft" button shown there is not a standard UI Action or Declarative Action as I could not find it.

So what we have done is that we created a List "My Email Drafts" shown in the Agent Workspace lists menu. It shows email drafts authored by the user. And we created a "Delete" List Action (declarative action table) for workspace that enables itil users to delete their drafts. Then you just need to communicate that email drafts can be deleted from lists.

Best regards,

Dominik

View solution in original post

14 REPLIES 14

@Dominik Simunek 

May I please ask if you can share code used to create "Delete" List Action as I never managed to create one?

 

Moumita
Tera Contributor

Hi StefanoZ

I have followed a different approach as mentioned Delete List button on Agent workspace - Now Platform - Article - ServiceNow Community

1. Create New List Action Assignment as 'Delete' for 'sys_email_draft' table
2. Delete option will be Implemented as 'Server Script'
3. Code in 'Server script' section of the List Action to delete drafts in List view of P2P Workspace
 
Thanks
Moumita

Moumita
Tera Contributor

Hi @StefanoZ

I have followed a different approach as mentioned Delete List button on Agent workspace - Now Platform - Article - ServiceNow Community

1. Create New List Action Assignment as 'Delete' for 'sys_email_draft' table
2. Delete option will be Implemented as 'Server Script'
3. Code in 'Server script' section of the List Action to delete drafts in List view of P2P Workspace
 
Thanks
Moumita

Moumita
Tera Contributor

Hi Dominik Simunek,

 

Please help as how you have created "Delete" List Action as I am not sure which 'client action' you have selected for Delete. 

There is no global or OOB Delete record in Action Payload Definition. Please reply

Moumita
Tera Contributor

Hi @StefanoZ

I have used a different approach Delete List button on Agent workspace - Now Platform - Article - ServiceNow Community

 

1. Create New List Action Assignment as 'Delete' for 'sys_email_draft' table
2. Delete option will be Implemented as 'Server Script'
3. Code in 'Server script' section of the List Action to delete drafts in List view of P2P Workspace