douglascayers / sfdc-convert-attachments-to-chatter-files

📎 Easily migrate your Attachments to Salesforce Files.
https://douglascayers.com/2015/10/10/salesforce-convert-attachments-to-chatter-files/
BSD 3-Clause "New" or "Revised" License
73 stars 29 forks source link

Research if Feed Tracking Enabled is requirement #14

Closed douglascayers closed 7 years ago

douglascayers commented 7 years ago

Per Alba Rivas:

In API versions 33.0 and later, you can create and delete ContentDocumentLink objects with a LinkedEntityId of any record type that can be tracked in the feed, even if feed tracking is disabled for that record type. Chatter must be enabled for the organization. I noticed you were explicitly checking in your code that feed tracking it activated for an object in order to do the attachment to file conversion. Maybe you could relax the validation as I think it is not needed anymore?

douglascayers commented 7 years ago

In testing, yes, can create ContentDocumentLink records to objects that don't support Feed Tracking. However, EmailMessage object should be blacklisted as you'll get error that you can't link files to the email unless its status is in Draft.

douglascayers commented 7 years ago

Feed Tracking is not required anymore for the entities to link with ContentDocumentLinks. This check in the code will be removed in future release.