Select All button for removing attachments
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 01:57 AM
Hi,
i`m looking for a way to add a button to the attachment pane called Select all, we already have a download all button but i am not able to find hwo to add this select all button:
- Labels:
-
Incident Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 05:12 AM
Hi
Technically it may be possible and you may be able to do it as well. My suggestion will be DO NOT CUSTOMIZE THIS AS THIS UI PAGE IS USED ACROSS THE PLATFORM AN MAY CAUSE ISSUE IN FUTURE.
I would suggest not to implement or customize this.
For reference posting the UI Page link below:
https://instance.service-now.com/nav_to.do?uri=sys_ui_page.do?sys_id=b1b390890a0a0b1e00f6ae8a31ee2697
Replace "instance' with your instance name.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 05:54 AM
Hi
Please let me know if you have any further query else please mark the answer as correct and close this thread for others.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-10-2022 09:22 AM
Was thinking about your requirement on what can be an alternative option and my suggestion will be as below:
1) Create a Button on the Table you want where you want to have an ability to remove all attachment.
2) Navigate to UI action module and create it as shown below. Make sure to check the Form button checkbox as true and use the code as below:
Using a button will give you an advantage to control whom this button should be visible to by updating the condition field in UI Action. If you want to have this functionality for all users then leave it as blank.
removeAttachment();
function removeAttachment(){
var gr = new GlideRecord('sys_attachment');
gr.addQuery('table_name',current.sys_class_name);
gr.addQuery('table_sys_id',current.sys_id);
gr.query();
while(gr.next()){
gr.deleteRecord();
}
}
UI Action screenshot:
Result:
This works for me. This can be an alternative approach instead of customizing the global UI Page which is not a recommended approach.
Hope this helps. Please mark the answer as correct/helpful based on impact.
Regards,
Shloke
Regards,
Shloke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-11-2022 03:01 AM
If you have a follow up query then do let me know else if your query is resolved then please mark the answer as correct and close this thread for others.
Regards,
Shloke
Regards,
Shloke