Abort Attachment insertion
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:16 AM
My requirement is to abort insertion of attachment on case table when attachment size exceeds 9MB and throw an error message.
Error message is throwing as expected but the null attachment is showing.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:23 AM
Hi @Prathyusha G I tested your code, it works fine for me in my PDI . Can you verify is there any attachment already added to the record? or try creating a new record and test
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:43 AM
Hi Harish,
It is working fine is Development instance but not working in Test Instance.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 01:47 AM
Hi @Prathyusha G If there is a attachment already present on the record it will display like below when you try to upload 2nd attachent.
Harish
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-17-2023 02:21 AM
no there is no attachment