Hitting dead end working with Chatter Feed Files

  • 1
  • Problem
  • Updated 3 years ago
  • (Edited)
I'm hitting a dead end with Files (AKA Chatter Feed Files, AKA content attachments). What I have built works sufficiently, but there are a couple of extra hoops to jump through that make it clunky and a bit confusing. Below are my issues that I'm hoping someone can help me through.

Background: So, If I build an interface based on the ContentVersions object, it only displays files owned by the user or files that have been shared with the user through a library. However, chatter feed files are like "Content attachments". Feed content SHOULD BE accessible by anyone that has access to the record the feed content is linked to through the LinkedEntityId field. So, if Care Manager A adds documents to our hypothetical customer Ben Franklin, then Care Manager B goes in to look at the documents, they SHOULD see the docs Care Manager A created in the table based on Content Versions, but they can only see documents they created or that were shared with them in a library. However, they can see all files by navigating to the Salesforce File Tab, but that is not a user friendly interface for finding docs connected to a specific record.
If I base the table on ContentDocument object, I can display all the feed files connected to Ben Franklin, whether or not they are owned by the user or specifically shared in a library, but then the fields are read-only.

1) ideally, I would like a table based on the ContentVersion object that displays ALL files accessible to the user, not just the files they own or that were specifically shared through a library with read/write fields. I don't know why non-owned files aren't displaying in ContentVersion object tables when they do display in ContentDocument object and in the Salesforce Files Tab based. The sharing is inherited by the sharing of the record that the file is connected to. So if a user has access to Ben Franklin and a chatter feed file is connected to Ben Franklin, the user has access to the feed file. Unfortunately, not through the ContentVersions object table.

2) it would be great if uploader triggered "new row actions" in a model. It triggers the requery of the ContentVersion object model, which I use as a trigger for some actions, but it would be nice to pinpoint the actions to act only on the newly created row. Any ideas?

3) Populating content delivery expiration date. You can create content deliveries right from a row action and populate the name and expiration date. If I populate the expiration date with Skuid's "Today" or "Tomorrow", it works great. If you use "Next Week" or "ndays" it does not populate the expiration date field appropriately. Any way I can get that field to update with something like "today plus 3"?
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb

Posted 3 years ago

  • 1
Photo of Skuidward Tentacles (Raymond)

Skuidward Tentacles (Raymond), Champion

  • 17,224 Points 10k badge 2x thumb
Regarding problem 1:
The table should be created on ContentDocument. For Editing, instead of editing a row on ContentVersion, the process to be to create a new row on ContentVersion. This allows anyone with access to the ContentDocument row to "edit" standard and custom fields by creating a new version of the document that then becomes the "LastPublishedVersion". So I think this solves my problem, but I haven't tested extensively yet.

Regarding problem 2:
I think if I create a model on ContentVersions limited to 1 row and sorted by created date, I can isolate just the most recently uploaded file matching my model conditions and create a model action to update rows upon model requery which occurs automatically when you upload a file.

Regarding problem 3:
I still need help with this if anyone is out there. (Ground Control to Major Tom)