Clear value of an attachment field
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 05:29 AM
Hi!
I have an issue with managing a file attachment field. I created an onChange client script that should delete the file when another field's value changes. I'm using an AJAX call to connect to a script include, which deletes the file from the sys_attachment table.
The deletion works, but until I reload the page, the attachment field still appears populated even though the file no longer exists in the sys_attachment table.
Is there a way to refresh the attachment field or clear the value correctly without requiring a full page reload?
Thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-11-2025 06:32 AM
Not if you don't put a refresh of the page in your script. Attachments are stored somewhere else and related to your record. Only when your record is reloaded, it won't show that relationship anymore. But why not just update the field itself to '' within your client script? That should work as well, since the attachment is being deleted.
Please mark any helpful or correct solutions as such. That helps others find their solutions.
Mark