You need to sign in to do that
Don't have an account?
Recreating Notes and Attachments for Chatter Feed Content Posts Only
I am using Chatter to manage Files on a record. As this record will be available to both the Partner and Customer Portals, I need to show a version of the Notes and Attachments Related List to give access to the Files for these users. I am unable to use Notes and Attachments as we can't have users create Notes or upload Files of this type.
I can create a table with Custom_Object__c.Feeds to show the Chatter Feed, and use rendered="{!(feed.Type='ContentPost')}" to show only the Files, but I am stuck on how to create the links to view them.
I have a basic understanding of Chatter Files and Content, but where do I get the URI that will allow all users to download the File and for Chatter users to preview the file?
FeedItem fi = [Select Id, Body, Title, RelatedRecordId From FeedItem Where Type = 'ContentPost'];
String filelink = URL.getSalesforceBaseUrl().toExternalForm()+ '/' + fi.RelatedRecordId;