19 votes
Accepted

Triggers on ContentObjects

Alright, I spent a couple of days going through it all, and the short answer is: it's complicated. Depending on what you want your triggers to do, you may need to have different triggers on different ...
user avatar
13 votes

Is it possible to get a sharing link (to non SFDC users) from 'files'/'content' via apex?

The idea thread mentioned by @crmprogdev is now realized. As of winter 15 there is now programmatic access to content deliveries. ContentDistribution cd = new ContentDistribution(); cd.name = 'test'...
user avatar
  • 9,436
10 votes
Accepted

Adding new "Files" related list to Visualforce page

Hey looking into your question this is the solution for you. You need to use AttachedContentDocuments <apex:page standardController="Account"> <apex:relatedList subject="{!Account.Id}" ...
user avatar
8 votes
Accepted

How can I create a Chatter File via Apex?

If you're asking how to upload files via Visualforce, or even just via Apex, there are code samples around: https://github.com/TehNrd/Multi-File-Uploader-Force.com shows how to upload via Visualforce ...
user avatar
  • 5,598
7 votes
Accepted

ContentDocument Object

The content data model is slightly different than other objects in salesforce. The way it works is that each document is represented as a ContentDocument. Each ContentDocument contains one or more ...
user avatar
  • 3,328
7 votes
Accepted

How to share files uploaded in "Files" related list to Community Users

Files uploaded via this related list will only be visible to internal users, and this field is not editable. One thing you can do is post the file to the record via the Chatter publisher, and ...
user avatar
7 votes

How to Share a ContentDocumentLink using "Set by Record"

Set By Record can be done upon assigning ShareType = "I", where it means: Inferred permission. The user’s permission is determined by the related record. For shares with a library, this is defined ...
user avatar
6 votes
Accepted

How to Share a ContentDocumentLink using "Set by Record"

This is available now in the Winter '20 release! https://releasenotes.docs.salesforce.com/en-us/winter20/release-notes/rn_files_sharing_set_by_record.htm
user avatar
5 votes
Accepted

Post to Chatter With Binary File from Javascript

The answer had been staring me in the face all damned day. I'd read this disclaimer in the docs: Web browsers are typically incapable of making multipart requests when the non-binary parts, such as ...
user avatar
  • 24.7k
5 votes
Accepted

Is it possible to get a sharing link (to non SFDC users) from 'files'/'content' via apex?

According to this post, the answer to your question about using content packs would be "no". On the IdeaExchange you'll find a submission titled Allow Content Deliveries to be programmatically ...
user avatar
  • 40.3k
5 votes

How to share documents with customer community login users

As you appear to know, Opportunity is not visible to users with standard Community Customer Licenses. If these documents are being attached to Opportunity, the only way to share them with your ...
user avatar
  • 40.3k
5 votes

What is the SObject for a chat conversation?

If you're referring to the Chatter Messenger feature (https://help.salesforce.com/apex/HTViewHelpDoc?id=collab_chat_using.htm&language=en_US), the chat messages are not supported in the SObject ...
user avatar
  • 2,723
4 votes

What is the SObject for a chat conversation?

Don't expect this any time soon. Chatter Messenger will be unsupported in Spring '17, and is not available in new orgs created after Spring '16. Chatter Messenger: Retiring in Spring ’17
user avatar
4 votes
Accepted

Upload a file to a chatter feed in Apex: API 36

Got it figured out, turns out you just use ContentVersion to upload a File: // ContentVersion is how you upload a file! ContentVersion version = new ContentVersion(); version.Title='Mah ...
user avatar
3 votes

How can I create a Chatter File via Apex?

Create Content Version String yourFiles = 'All your info goes here'; ContentVersion conVer = new ContentVersion(); conVer.ContentLocation = 'S'; // S specify this document is in SF, use E for ...
user avatar
3 votes

ContentDocument Object

seems via apex it is only nillable Properties Filter, Nillable, Sort https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/sforce_api_objects_contentdocument.htm I believe you have to ...
user avatar
  • 53.1k
3 votes
Accepted

how do you access chatter public links through apex/api?

Since Winter 15 it's even easier, you can use Content Distribution : https://www.salesforce.com/developer/docs/api/Content/sforce_api_objects_contentdistribution.htm
user avatar
3 votes
Accepted

Confusion Regarding Files, Attachment, Document,chatter and Content Distribution

Very Good Question, I'll share my umderstanding ->Files: Upload a file and store it privately until you're ready to share it. Share the file with coworkers and groups to collaborate and get feedback. ...
user avatar
2 votes

List of an Account's Chatter files in a Visualforce page

I've done this with the ConnectAPI so users can select docs to share with another account/opportunity. I have a utility class with a wrapper, then display that wrapper on the VF page. I public with ...
user avatar
2 votes

List of an Account's Chatter files in a Visualforce page

You can find the line number of the problem by looking in the debug log. It is in the DocumentLinks query because that code executes before the variable a is assigned in the constructor (as execution ...
user avatar
  • 129k
2 votes
Accepted

I want to stop chatter emails when I create ContentDocumentLink

I've used the following User object settings to turn off Chatter's emails. There are several of these kinds of fields in the User object.... u.UserPreferencesDisableAllFeedsEmail=true; u....
user avatar
  • 288
2 votes
Accepted

Can I share files in Chatter just to 1 single person?

Just upload the file, click Sharing Settings and add the user you want using Share with People:
user avatar
2 votes
Accepted

Change file sharing settings of chatter file using the Connect API

Access to the file is based on access to the parent entity it is shared with. In your case, anyone who can see the custom object will have access to the file. If the org wide default sharing for the ...
user avatar
  • 261
2 votes
Accepted

Problem trying to upload ContentVersion from base64 image data via REST API

I eventually ruled out being able to use base64, this is because the API does not seem to support the "Content-Transfer-Encoding: base64" header. Further to this, when I tried sending raw binary data ...
user avatar
2 votes

unable to drag and drop file form Outlook (2013) to Salesforce Files

There is no way to fix this from within Salesforce. You need to use a third-party utility like http://www.outlook2web.com/
user avatar
2 votes

unable to drag and drop file form Outlook (2013) to Salesforce Files

I think this is either a limitation of your Outlook client, or your Operating System, rather than being a limitation on the Salesforce side. The drag and drop events are handled by your browser, ...
user avatar
  • 7,211
2 votes

Can we open files/attachments in Salesforce1 without enabling Chatter?

In the Spring `16 release notes there is a section called: Files Without Chatter Now you can use Salesforce Files whether Chatter is on or off! You don’t use Chatter, but you want to take advantage ...
user avatar
2 votes
Accepted

Can we open files/attachments in Salesforce1 without enabling Chatter?

We've confirmed with Salesforce support, we need to enable Chatter in-order to open files or attachments in Salesforce1. Currently, there is no option for separating Salesforce Files and Chatter.
user avatar
  • 640
2 votes
Accepted

Is there a way to download chatter file IDs from the file storage?

Yes. Based on the Chatter Collaboration datamodel or the Chatter Cheat sheet you can find out that it's the ContentDocument table you're looking for if you want to find chatter files. You can query ...
user avatar
2 votes

How to share files uploaded in "Files" related list to Community Users

Replace YOUROBJECTAPI with your object api name and it will share only files uploaded on a that object trigger shareFilesWithCommunityUsers on ContentDocumentLink(before insert){ Schema....
user avatar
  • 13.3k

Only top scored, non community-wiki answers of a minimum length are eligible