TL;DR: Question about the ContentDocumentFeed object and the FeedItem object: which is the one I want to use when accessing files uploaded through the Salesforce Files Sync tool? I can see that both have access to the base64 file data, but I don't know which is the correct object to use.

Full explanation: I'm interning for a company and they have a scanner to upload JPEG images to a shared drive. From there, the images are copied to a Salesforce Files Sync folder.

I need to be able to process each image file as a new attachment to a custom object (I have Notes & Attachments enabled for the object already). The scanned images are product registration cards that need to have the info listed on them entered in as fields for the custom objects.

I understand how to do that part: make a trigger that acts on ContentDocument after insert, and generate a new custom object record with a new Attachment for that object, setting the attachment's base64 content to that of the uploaded file, for each ContentDocument found. From there, I just have to make a VisualForce page to show the new custom objects along side the attachment they have associated with them, and all of this will be controlled by a workflow.

But I don't know whether to use ContentDocumentFeed or FeedItem to access the file data. Because of the limit on CRM document uploads, I'd prefer to maintain that the files do transition to attachments, rather than link each ContentDocument to each new object, since then, as attachments, they'd be able to remain on the server, and the ContentDocuments can be permanently deleted afterward.

Can anyone help me?

1 Answer 1


The answer was ContentVersion.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .