- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2024 01:28 AM
If i have an attachment attached to an incident and i delete that Incident, the Attachment will be deleted also?
Does someone of you know, how ?
And does this also delete the att from "Sys_attachment" or also from "Sys_attachment_docs" ?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2024 01:56 AM
Hi @Meloper
Yes, the attachments will be deleted automatically if a record is deleted. I think this is happening through event generation, but I am not 100% sure.
If attachment is deleted then the references to this attachment in Sys_attachment_docs also will get deleted. This is controlled through cascade deletion rules.
The sys_attachment_doc table has a field that links the records there to a sys_attachment record. that field is named 'sys_attachment' it is a Reference field and has Reference Cascade Rule set to "Delete". OOB That means when a sys_attachment record is deleted, any related records in sys_attachement_doc should also be deleted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2024 01:47 AM
Hi @Meloper,
It might be causing because of the Cascade Delete Rules so check if it related to this or not.
Thanks,
Rajashekhar Mushke
Rising star : 2022 - 2024
Community Leader -2018
Connect me on LinkedIn : Rajashekhar Mushke
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-09-2024 01:56 AM
Hi @Meloper
Yes, the attachments will be deleted automatically if a record is deleted. I think this is happening through event generation, but I am not 100% sure.
If attachment is deleted then the references to this attachment in Sys_attachment_docs also will get deleted. This is controlled through cascade deletion rules.
The sys_attachment_doc table has a field that links the records there to a sys_attachment record. that field is named 'sys_attachment' it is a Reference field and has Reference Cascade Rule set to "Delete". OOB That means when a sys_attachment record is deleted, any related records in sys_attachement_doc should also be deleted.