Prevent deletion of attachment once the incident is submitted
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 01:28 AM
Hi Team,
I want the end users to prevent removal of attachment only once the case is submitted,They should be able to add an attachment and delete it before the case is submitted,but should not be able to delete it ,once the case is submitted in service Portal.
How we can achieve this.Want to remove the cross icon ,so that users will not be able to delete the attachment.
Thanks,
Karan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-04-2023 04:35 AM
To remove the option to delete an attachment after an end-user has submitted a case on the Service Portal, you can modify the behavior of the Attachment UI Macro. Here are the steps to follow:
1 Navigate to the Service Portal.
2 Open the page containing the form where you want to remove the delete option.
3 Click the edit button to edit the page.
4 Locate the Attachment UI Macro on the page and click on the pencil icon to edit it.
• In the Attachment UI Macro editor, find the line of code that starts with "attachment_list.show_delete" and set its value to "false".
• This will remove the delete option for all attachments on the form.
5 Save the changes to the macro and the page.
After following these steps, the delete option for attachments will no longer be available to the end-user after they have submitted the case on the Service Portal. Note that this change will apply to all forms that use the Attachment UI Macro on the Service Portal, so be sure to test thoroughly before deploying to production.
Please mark it helpful and correct if this fixes the ask. Thank you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-05-2023 12:09 AM
Hi Vipul,
I went to that page,and can see the below screenshot
When I clicked on Pencil icon in Ticket Attachments,I can see the widget-widget-ticket-attachments,but was unable to find the line of code-line of code that starts with "attachment_list.show_delete".
Can you please help me on this.
Thanks,
Karan