A message from our CEO about the future of Stack Overflow and Stack Exchange. Read now.

Questions tagged [contentversion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
7
votes
1answer
867 views

Visualforce: Why the display of an PDF-File inside an IFRAME works on a Sandbox but not in Production?

On a Visualforce page I have an IFRAME like this: <iframe class="viewer" src=""></iframe> It starts up an shows nothing because src is blank. Good. To store the actual PDF I upload it as ...
0
votes
1answer
1k views

Insufficient Privleges while delivering content

I am having trouble delivering an existing content file. I am unable get any of files while performing a search. I am able to deliver content if i am uploading the file instead of searching for it. It ...
1
vote
0answers
391 views

Cannot Query ContentDocumentLink as a Portal user

I have a situation where I am trying to retrieve documents which were generated by DrawLoop and added to SFDC as Files. As the System Admin user, I can query for this data using the following query: ...
0
votes
1answer
2k views

Not able to create ContentDocumentLink from sforce ajax

I have followed this to create a content version from vf page using sforce ajax and it is working fine. To link the uploaded content to one of my custom object I added the below code; var result1 = ...
6
votes
1answer
881 views

unable to view contentversion file as public site user

I'm utilizing the following URL to load an image stored as a ContentVersion file in an IMG tag. It loads correctly in SF but not on the force.com public site: /sfc/servlet.shepherd/version/...
2
votes
2answers
2k views

Copying ContentVersion Image File from one record to another with Apex

Is it possible to copy a ContentVersion image associated with one record so that the copy is associated with a different record? Code below gives me the following Execute Anonymous error.: Line: ...
2
votes
2answers
2k views

Getting the Contents of a CSV File Inside ContentVersion Object in Salesforce

How can I get the body of a file stored in ContentVersion object in salesforce? I've attempted to query its contents but seems that there is no field holding the body value. SELECT Id,...
2
votes
0answers
138 views

SOSL query on ContentDocument [closed]

I have a requirement to search within files. To get that working, I have a SOSL query on ContentVersion. It seemed to work as expected when I tested as myself, however... I myself seem to get the ...
2
votes
1answer
1k views

Content Version's record is not visible

For e.g. when we upload any file under files tab then the files details are saved in the ContentVersion object and we can see these details. But when we upload any chatter file, that file details are ...
0
votes
1answer
5k views

Relationship between ContentVersion object and Document object

I currently have the ContentVersion information of a file I'm uploading, is there any way to find the Document Id using this info? Maybe through ContentDocumentLink or ContentDocument? I wish to ...
2
votes
1answer
2k views

File is uploaded in the private library or public library

I have written a triger (before insert) on ContentVersion object and I am checking that the user is going to upload the file in private library or public library. According to my findings which I got ...
0
votes
0answers
171 views

How to send a file stored in contentversion to an external api

My question is specifically related to getting a file stored in contentversion and converting it to string. I want to send this to an external service to parse file and return an xml which i am not ...
6
votes
7answers
9k views

uploading files in contentVersion using lightning component

I am developing a lightning component to upload files in the contentVersion object. I used this site as a reference: http://peterknolle.com/file-upload-lightning-component/ I was able to ...
-1
votes
1answer
2k views

Open PDF in browser instead of Downloading

Using sfc/servlet.shepherd/version/download/{!id} in URL to download PDF files from ContentVersion in a public site. Is there anyway to get a PDF file to open in a browser instead of Downloading it ...
3
votes
0answers
770 views

ContentPublication Limit exceeded in Unit Test

I have Apex triggers on ContentDocument and ContentDocumentLink Sobject. I wrote my Apex Unit Tests for those triggers and I was creating more then one Content Data record to test the Logic in Bulk. ...
0
votes
1answer
325 views

Apex Batch Job fails if I create and delete a ContentVersion

I just found a strange Salesforce behavior (maybe, an internal defect). If a code tries to insert a new ContentVersion and then delete it (via ContentDocument) within a single APEX transaction (the ...
3
votes
1answer
2k views

Querying For ContentVersion with ContentDocument Ids

I am trying to query ContentVersions based on the related ContentDocument Ids and getting 0 results returned even when the user can access the file in the user interface and there is a ...
0
votes
0answers
153 views

SOQL on ContentVersion results in 'invalid parameter value'

I am writing a query to upload the contentversions which are not present in my Organization. For this, I am checking the presence of contentversion if it exists or not. This hit a snag where the query:...
2
votes
0answers
796 views

Display image from “Files”/ContentVersion in VisualForce [duplicate]

I'm working on a project where I'll be using VisualForce to render custom PDF service reports. So my page will take in the ID of a Service object (from Field Service Lightning) and populate all the ...
1
vote
1answer
501 views

Rest API download content packs

I'm trying to download content versions through Rest API. I am not able to download content packs (FileType = 'PACK'). However, the same could be done through Salesforce web which downloads as a zip ...
0
votes
1answer
410 views

Fetching all the content notes related to an Event

Requirement I have to fetch all the content Notes that are associated to events created after 01-Aug-2016. Logic path I have taken the following path to get to content notes fetch events find ...
2
votes
0answers
256 views

Rest API - Download times out without any errors

I am downloading ContentVersions through Salesforce using Rest API. I have submitted several file requests and downloaded. After downloading, an observation was that the ContentSize field in ...
1
vote
2answers
360 views

Issues downloading docx and xlsx

We are using forcetk REST API for uploading files to contentVersion in salesforce. Everything works fine uploading and downloading files from and to contentVersion. But we are facing some issues while ...
6
votes
3answers
10k views

ContentDocument parentId

I am uploading a file via the Files related list on the Contact detail page. When I query (SOQL) the database I see the relevant ContentDocument and ContentVersion records. I would like to get the ...
1
vote
1answer
6k views

how to insert content version in test class

how to insert content version in test class what value set for versionData pathOnClient FirstPublishLocationId
1
vote
0answers
602 views

How to create content version in specific content folder from Apex?

I'm able to create content version and content folder in salesforce files using Apex but can anyone please help me how to create content version in one of content folder . Thanks
2
votes
1answer
2k views

Migrating Chatter files attached to feed comments

I am ultimately trying to use data loader to migrate our chatter posts & comments that have files attached to them. They were originally added by uploading directly from computer to the comment. ...
2
votes
2answers
735 views

JS Remoting + Angular Ng-File-Upload

I was wondering if anyone had any examples using AngularJS + NgFileUpload and a @RemoteAction that handles base64 encoded file-data to create a drag & drop uploader? I have JS handler that works ...
10
votes
1answer
158 views

SOQL: (WHERE x IN(a,b)) does return 2 records, but (WHERE x = a OR x = b) returns only 1 record… Why?

I'm trying to retrieve some ContentVersion records, but I'm having a lot of issues with it. After some research it seems as if the records are divided into two 'sets' as it were, and Salesforce in ...
3
votes
1answer
922 views

Apex Query on ContentVersion object and get all record

Apex Query on ContentVersion object and get all records, but the record are coming on current login user owned, not all records are coming. for example i am login with administrator account and want ...
1
vote
1answer
593 views

Insert bulk data in ContentVersion with Bulk API

We are working on a migration application in C# to migrate data from SQL Server to Salesforce and we are using Bulk API and sforceService (Salesforce Enterprise WSDL) for this. We are migrating data ...
2
votes
0answers
2k 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
635 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
1answer
83 views

Hide master record type

In Content Version, I have a record type say 'ABC' which is assigned to profile 'XYZ'. But when I log in as the profile XYZ, I'm getting a field called Record Type with the options 'General' and 'ABC'....
0
votes
1answer
653 views

Record type in Content Version Object

I have a picklist in the Content Version object and I have a set of profiles. The values of the picklist must be restricted to each profile that is the values seen by one profile should not be seen by ...
0
votes
1answer
564 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 set<...
0
votes
1answer
364 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 ...
0
votes
2answers
429 views

Is there a way to link to a content record from a salesforce email template?

This is what I am working with: <messaging:emailTemplate subject="Activated Agreement {!relatedTo.Name}" recipientType="User" relatedToType="ContentWorkspace"> <messaging:htmlEmailBody > &...
1
vote
0answers
56 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 ...
2
votes
1answer
3k 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: Map<Id,...
0
votes
1answer
474 views

FeedItem ParentId Access

This question is an extension of: ContentWorkspace Permission And Migrating I have Portal Users that are creating FeedItems that are related to a custom-object record they have access too. Previously ...
3
votes
1answer
740 views

Adding Delete button to custom list controller for ContentVersion

I've been trying to have this code done with and finished for ages, and everytime I think I'm done, the person who wanted the code always adds an extra feature he'd like added in last minute. :T In ...
3
votes
1answer
419 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 ...
1
vote
1answer
2k views

Upload Content Version using REST Api [closed]

I am referring to https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/api_rest/dome_sobject_insert_update_blob.htm documentation for Content Version and getting this error " You have sent ...
0
votes
1answer
320 views

Remove Default Record Type for Content “General” from Page Layout

I need to remove the Standard Record Type Field from Library Page Layout. I had record types earlier which I have deactivated and even deleted but still the Master Record Type is present on the page ...
2
votes
1answer
2k views

Allowing customer portal users to download attachments

I'm trying to implement a feature in out customer portal that allows the users to upload a document (which is then stored as an attachment on a custom object) and retrieve it again. I've managed to ...
5
votes
2answers
696 views

Can't pinpoint what is causing DUPLICATE_VALUE error on contentDistribution insert

I have a custom app that is used for scheduling face-to-face trainings. I'm trying to set up a class that will run daily to gather all trainings scheduled for the next two weeks, and send out ...
5
votes
2answers
4k 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 ...
1
vote
0answers
780 views

Access Salesforce CRM Content in Communities & public VF pages

We have a requirement to put a custom download link on VF page for few Salesforce CRM Content. We would like to share few Salesforce content with "Community User" and few Salesforce Content with guest ...
1
vote
3answers
2k views

How to set the default record type for Content Version in the Enhanced Profile User Interface

In the original Profile User Interface this is obvious: Go to the desired Profile Find the section called ‘Standard Record Type Settings’ Look for the label ‘Content Versions’ Click [Edit] and select ...