Is there anyway to prevent a user from deleting a New Note, based on the status of the Opportunity that the contentnote is linked to?
The requirement is that I have a datetime field that is set, once the opportunity status is "Closed Won". Once this datetime field is not null, a note linked to this opportunity record should not be deleted.
I started writing a trigger on the contentdocument object (since ContentNote wont allow me to write a trigger), but it looks like the code is not working since its never hitting the ContentDocument Trigger.
Is this achievable?