The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
0answers
11 views

Email notification when a document is archived

We have provision to get an email when a document is uploaded to the library or when a new version of the document is updated by subscribing to the library and the document respectively. But is there ...
2
votes
1answer
37 views

Attach ContentDocument to record [closed]

Maybe someone knows how to attach ContentDocument to record through Apex? I need to copy ContentDocuments (which are in Google Doc's, Notes and Attachments related list) from one Object to another. I ...
0
votes
1answer
23 views

Compile Error: Non-void method might not return a value or might have statement after a return statement. at line 17 column 9

upload any file upto 2 gb from content version @RestResource(urlMapping='/DragAndDrop/v1/*') global with sharing class DragAndDropRESTAPI { @HttpPost global static String attachDoc(){ ...
0
votes
0answers
28 views

Unit Test for contentDocument

I am having some difficulty understanding how to design a unit test that works with content documents, particularly when they are attached to records. The use case I have is we want to protect all ...
0
votes
1answer
28 views

Unable to cover to test class for below trigger

I have written trigger and a test class for my content version Handler public class handlerClassContentVersion{ public set<string>prodNames = new set<string>(); public ...
0
votes
1answer
17 views

Insert ContentDocumentLinks for Chatter Content Posts

We have a set of ContentVersion records that have been inserted by users via a FeedItem post. Unfortunately because Chatter groups has many functional limitations we have to migrate these files to ...
1
vote
0answers
12 views

Why doesn't ContentVersion support getUpdated() or getDeleted() calls?

I'm working on backing up Documents, Attachments, ContentDocuments, ContentVersions. It seems that I cannot use getUpdated() and getDeleted() calls on ContentDocuments and ContentVersions. However, I ...
0
votes
0answers
30 views

How to programmatically set File/Feed Item Permissions

There are a couple of questions already similar, but not quite the same - we are in quite a bind, every fork in the feed item/content road has been a total dead end, after almost 9 years on this ...
0
votes
1answer
52 views

Querying ContentVersion or ContentDocument for User Other Than Owner - Only One Record At a Time?

My issue is that I can't seem to query more than one record at a time from the ContentVersion or ContentDocument if I'm not the owner of the file. Here is what works for me: ...
5
votes
1answer
105 views

Winter 16 Release - “new” Notes

As part of the Winter 16 release, in addition to the lightning experience Salesforce rolled out some new Notes. I enabled the new notes, however we are keeping salesforce classic experience for now. I ...
3
votes
1answer
38 views

ContentWorkspace Permission And Migrating

I am working on an instance that has a large set of ContentVersion data uploaded by Customer Portal Users and saved across many ContentWorkspace(s) or Libraries. We have encountered some issues ...
4
votes
1answer
48 views

ContentDocumentFeed vs FeedItem

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 ...
0
votes
0answers
52 views

Getting the list of members of a ContentWorkspace(Library) in apex

I have a requirement to send an email to all the members of the ContentWorkspaces to which a ContentDocument belongs. I have got the list of Content workspaces to which that document belongs. But how ...
0
votes
2answers
24 views

Document Upload and show as a link

We have a word file whose size is 15 MB and want to download it thorugh a link from Home page. However, as the standard document tab can only accept till 5 MB document size, it is not fulfilled. ...
0
votes
0answers
56 views

Upload File (image/audio/video) to FeedItem in chunks

​public static String upload(String folderId, String documentId, String fileName, String base64BlobValue) { if(documentId == '' || documentId == null) { Document document = new ...
1
vote
0answers
18 views

Moving archived content from one Salesforce Library to another

I am trying to move archived content from one library to another. We are consolidating libraries and remapping content, but dataloader does not allow you to move archived content. Suggestions?
0
votes
0answers
19 views

Salesforce CRM Content library considerations

Can we use salesforce Content Management as document repository? If no then what are the alternatives. If yes what is the limit on no of docs that can be uploaded by a user. I have gone through the ...
1
vote
1answer
351 views

Retrieve all ContentDocument Ids whose related ContentDocumentLink record is updated/added

I want to retrieve File Ids for which new entry has been added or removed from child ContentDocumentLinks relation. Following is the parent to child relationship query I made for retrieving Ids, title ...
3
votes
1answer
350 views

Trigger on ContentDocument not working

I am trying to setup triggers on ContentDocuments. The following link says that this is possible https://developer.salesforce.com/releases/release/Spring12/contentdocument+triggers I am able to ...
0
votes
0answers
28 views

How to figure out if a ContentDocument has been shared/Unshared?

I want to figure out when a ContentDocument has been shared or unshared with some user/group which is internal/external to the enterprise.. I see that an sobject by the name ContentDocumentLink is ...
1
vote
1answer
81 views

How to delete ContentDocumentLink records massive

I want to free some space in salesforce related to Chatter Files or Files, I though all records are stores in ContentDocument object, but when I delete records from this object, the file storage still ...
1
vote
2answers
66 views

Querying all the files from a list of groups for a particualr user

I'm trying to display all the files of all the Groups to which a user belongs to. i.e, if the user is a member of GroupA and GroupB, then I have to display all the files which belong to GroupA and ...
0
votes
1answer
90 views

Inconsistent ContentDocument Query Results

Using the Developer Console as System Admin: The result of this query: SELECT Id FROM ContentDocument does NOT contain the row returned from this query: SELECT Id FROM ContentDocument WHERE ...
2
votes
1answer
143 views

Getting Blob data from content document using File Sync

So im using File Sync to upload an excel file to salesforce in order to use it in other class ive built (the class is reading the csv file and insert the data to salesforce - that one works fine ...
1
vote
0answers
52 views

how to view a picture in a word document on offline mode VisualForce

I trying to access a picture in offline mode ( without a connection), stored in a word document which i generated with visualforce but it gives the following error. Can you please, tell me if it ...
0
votes
1answer
89 views

Creating a contentworkspaceDoc?

I am trying to create a contentworkspaceDoc , contentWorkspaceDoc allows a document to be shared with multiple libraries. I am have a query where I pull all the existing contentworkspaceDoc from the ...
1
vote
1answer
155 views

UserRecordAccess

Does UserRecordAccess report edit-ability of ContentDocument or ContentVersion records? Every user I query URA with for either object returns HasEditAccess=true even if the content is not shared ...
4
votes
2answers
758 views

Visualforce Pages in Object specific actions

I have a simple vf page that just calls a controller's method on the action attribute <apex:page standardController="C_Object__c" extensions="Ext1" action="{!method1}"> ...
1
vote
1answer
570 views

A link to Content documents from a VF page

I am managing my document in SF content library. I want to include a link to some documents in a VF page BUT I don't want the link to open the document preview on the Content tab. I would like the ...
2
votes
1answer
68 views

I want to stop chatter emails when I create ContentDocumentLink

I'm uploading multiple files via the SOAP API in a nightly process. Part of that is assigning permissions to the files. I'm using ContentDocumentList to allow a user to see a document. When creating ...
5
votes
1answer
288 views

Is there a way in apex to add 'force.com Content' files as attachments in emails?

I need to develop a way for users to select what content they want from a custom page and then have it added as an attachment to an email. I know you can add attachments to emails via: ...
1
vote
1answer
1k views

How to Test ContentWorkspace, ContentDocument & ContentVersions

So I have some apex code that is query some Content Workspaces, Documents and Versions. As far as I can tell these are ready only in Apex. Error: Field is not writeable: ContentDocument.Title ...
4
votes
1answer
252 views

SOSL Filter by Library on Salesforce Content

Is is possible to search Salesforce Content in a specific library (ie. ContentWorkspace)? According to the Content data model, it seems the relationship between ContentWorkspace and ContentVersion ...
3
votes
1answer
992 views

SOQL query to load all documents in a content library

I am trying to query for all the documents in a library using the BULK API. The SOQL query I use is SELECT ...
7
votes
1answer
1k views

Trigger to avoid file upload to chatter comment

We want to avoid, that a user is able to upload files to chatter comments. We realized this by creating triggers on FeedComment and ContentVersion. This prevents to save the comment successfully. If ...
1
vote
1answer
304 views

Return with Soql query “Related Content”

I'm trying to write a soql query to get all the content's ids of the related content on a custom object. I would like to know which are the related content of a record. I have tried with Schema ...
2
votes
1answer
732 views

How to upload an Excel file into ContentVersion Object

I need to upload an Excel file on an opportunity. I want to user ContentVersion standard object to store these excel files. Can anyone please explain or share a code snippet to show how can we ...
2
votes
1answer
727 views

How to delete latest version from ContentDocument?

Is there any way we can delete Latest Version from ContentDocument? I have tried deleting ContentVersion, but DML Operation Delete is not allowed on it. I have tried deleting ContentDocument, but it ...
11
votes
4answers
3k views

How can Document folder be created in unit tests?

Can Document folders be created in unit tests? If not, is there a simple workaround for testing Document objects in unit tests?
5
votes
1answer
479 views

ContentVersion Reasonchange not updateable?

I have a before update trigger that I want to use to capture updates to previous version records in the contentversion. I want to add additional text to the reasonchange that was added by the user ...
4
votes
2answers
5k views

how to show sharepoint documents in salesforce?

How to show sharepoint documents in salesforce? I should also be able to upload documents from salesforce directly to sharepoint if the users attach a document for a record in salesforce. Any idea ...
2
votes
3answers
1k views

Transfering content from one library to a new library

I attempting to move content from one library to another in mass. I have come into a snag where I am given an error message. "You do not have the level of access necessary to perform the operation ...
2
votes
1answer
472 views

Sharing documents with High volume portal users

My problem is similar to this but also with the added problem of security. High Volume Customer Portal user - Insufficient Privileges for non-image Documents I want only a certain group of people ...
9
votes
1answer
615 views

Obtaining all ContentDocument records using SOQL

According to the Salesforce documentation on ContentDocument Users (including users with the “View All Data” permission) can only query files they have access I find this very strange. Why would ...