I have a requirement where when I attach or delete a file in attachments of a Case I have some fields to updated accordingly. I have noticed that when I insert an attachment, the Content Version trigger gets called. Where as when I am deleting an attachment, the Content Document trigger is called, not Content Version trigger nor Attachment trigger. Is it because the Content Document has only one Content Version?
When I insert the same file again as attachment, I am creating a new Content Version with new Content Document. How can I create a new Content Version for the same Content Document? Is by apex (querying for a Contend Document and adding a Content Version) the only way I can create new Content Versions to the same Content Document?