Questions tagged [contentversion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
0 answers
24 views

Error when pulling contentversion data to create file in google drive using python

I am getting an error when trying to create a file in google drive using the salesforce contentversion data url for (index, row), (index2, row2) in zip(df2.iterrows(),df3.iterrows()): acid = ...
Pauline's user avatar
  • 375
1 vote
1 answer
70 views

Uploading Content as a new version via LWC File Upload

I am trying to provide a custom interface for uploading a new version of a file in Experience Cloud. I know folks have asked this before, but with the ability to add a custom field to file upload, I ...
BritishBoyinDC's user avatar
-2 votes
0 answers
38 views

Create Post with FileName (Generate URL as FileName). My requirement is to create a post on case when Attachment is uploaded. somebody help me here

trigger CreatePostwithFile on ContentVersion (after insert) { List<FeedItem> feedItemsToInsert = new List<FeedItem>(); // Create a map to store ContentVersion Ids to avoid ...
Shannu's user avatar
  • 1
0 votes
2 answers
48 views

Access to ContentVersion record for Community User

In my org, a user with license "Customer Community Plus" is not able to access a particular ContentVersion record. (When trying to access the record using Standard API, a 404 [Not Found] ...
Tan343's user avatar
  • 57
0 votes
0 answers
17 views

File Privacy on Records field is not visible in Edit File details opened from row actions in Related Files

I've included File Privacy on Records field to ContentVersion object layout and it is shown everywhere except when I click "View All" on Files related list on record page and then "Edit ...
dobra_wodka's user avatar
2 votes
0 answers
39 views

Standard content version api is storing the binary content as is in the object without converting it as actual file [duplicate]

I am trying to upload a file >50MB to Salesforce Content version object with reference to the Standard ContentVersion API API Ref: https://developer.salesforce.com/docs/atlas.en-us.api_rest.meta/...
sf developer's user avatar
0 votes
0 answers
29 views

Why does the content version insert fail in a test?

I have a method that takes a contentVersion where the data is stored locally and does a callout to transfer it to sharepoint creates a new ContentVersion with a link to the sharepoint file to replace ...
Andreas Tschritter's user avatar
0 votes
0 answers
59 views

Content Version image link doesn't work on public Visualforce page

I am using Content Version to store images to display them on my Visualforce pages background like : background : url('{image-link}') center center/cover To do so, I retrieve the image links via ...
Hasan Tokul's user avatar
0 votes
0 answers
72 views

SOQL nested query ContentVersion, ContentDocument, ContentDocumentLink

I am trying to access ContentVersion, ContentDocument, ContentDocumentLink to achieve a count of each contentversion per object. The relationships between the objects I activated QueryAll Document, ...
Art's user avatar
  • 11
1 vote
1 answer
76 views

Uploading a Content Version record using Postman with OwnerId field throws error

I have created a connected app which my client will be using to create cases in Salesforce. On testing the connected app using Postman I was able to get the access token, and also responses for SOQL ...
sumchans's user avatar
  • 767
1 vote
1 answer
35 views

Error id value of incorrect type when inserting ContentDocumentLink

I know from the error that it is looking for the id of the contentdocument and not the id of the contentversion that got inserted. But I am just confused after inserting the files how do I get the id ...
sumchans's user avatar
  • 767
0 votes
0 answers
54 views

Uploading file using multi-part from python

Hello I am trying to upload file to contentversion via rest api tp salesforce using python. I keep getting an error. Can you please let me know how can I form my request so it adds the boundary string ...
PassionForDev's user avatar
0 votes
1 answer
71 views

Question related uploading file using multipart/form-data via postman

I have done the following setup in Postman, but I keep getting following error - [ { "message": "Multipart message must include a non-binary part", "errorCode": "...
PassionForDev's user avatar
0 votes
2 answers
105 views

Not getting any records from ContentVersion in Salesforce SOQ query which we are not owner of

When I am creating a new record (release), I would like to get a file off a related record (inventory) and then create a copy of it on the release. The problem I am facing, is that this only works if ...
Finbar Tracey's user avatar
0 votes
1 answer
46 views

ContentDocumentLink Trigger successfully blocks file upload on Org but fails in Dev Console

I want to block file uploads (ContentDocumentLink) on a FundingOpportunity object when status is Canceled or Closed. It works fine in the org, but it fails when I tried it on Dev console. A File is ...
ash's user avatar
  • 1
0 votes
1 answer
221 views

Downloading a file via REST API

I need to download files with the API, using now data/v59.0/sobjects/ContentVersion/{contentVersion}/VersionData but it's returning the entire file as application/octetstream but without a Content-...
Marcos Forlenza's user avatar
0 votes
1 answer
150 views

what is the alternative method "EncodingUtil.base64Encode" in JavaScript or VisualForce?

I have been using EncodingUtil.base64Encode() ; to get base64 contentversion data aiming to send/upload file from salesforce to outside server like AWS S3 which was working fine but due to sfdc ...
Mohammad Zakir Hossain's user avatar
3 votes
0 answers
60 views

Mismatched LInkedEntityId on ContentDocumentLinks

I'm trying to link attachment files to Salesforce EmailMessages. Steps so far: Upload attachment file by posting to /services/data/v58.0/sobjects/ContentVersion. Query ContentVersion table to get ...
Alex's user avatar
  • 31
0 votes
0 answers
66 views

INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY, You don't have permission to share this file.: [ContentDocumentId]

I am Facing this issue only while executing the below code in the Guest User context, how to resolve it? The exeption occurs while inserting contentDocumentLink Record. ContentVersion cv = new ...
Satyendra Raghuvanshi's user avatar
0 votes
0 answers
18 views

How to sent ContentVersion's VersionData through API? [duplicate]

I am trying to send a pdf file attached to a record of custom object to an external system. I am using ContentDocumentLink and ContentVersion to get the file in apex and make a api call. File is ...
PARAG TALUKA's user avatar
-1 votes
1 answer
255 views

Create a Public Download Link for my Attachment

I have an Object which has attachments and I can access those using ContentDocument and ContentVersions. but when i try to create a download link for the same using ContentDistribution I am able to ...
user9158002's user avatar
0 votes
1 answer
43 views

DistributionPublicUrl String length limit

Can anyone know what is the DistributionPublicUrl in ContentDistribution object String length limit in Salesforce ? I was trying to create an DistributionPublic URL whenever a new file is created or ...
Van Minh TRan's user avatar
0 votes
1 answer
111 views

Guest User cannot edit ContentDocument

We have a system in place to allow guest users (under some circumstances) to modify files in Salesforce (those pesky ContentDocument and ContentVersion records). This system works in the development ...
AvailableName's user avatar
0 votes
0 answers
70 views

Salesforce API to retrieve files with size 2GB

So, we upload files approximately with size of 2GB in salesforce cases in lightning. What would be the best way to receive it? (Download through api). Currently, I use /ContentVersion endpoint to get ...
anyman's user avatar
  • 1
0 votes
2 answers
361 views

How to write a Scheduled Flow to count how many Notes are related to an Account record?

I'm trying to write a Scheduled Flow to count how many Notes are related to an Account record. I have a Scheduled Flow on Account that is configured to walk through all Accounts every day. The first ...
Jack Odell's user avatar
0 votes
0 answers
27 views

Note Test Method Issue

I created an apex method that checks if the content of a Note is lower than 10 characters. I have some problems with the test method and i can't make it work. I get an assertion failed on this test: '...
Artur's user avatar
  • 9
0 votes
0 answers
69 views

Master-Detail relation to ContentVersion object

I'm currently considering the implementation of a solution and I would like to ask for your advice. The initial requirement is to establish a one-to-many relationship with the ContentVersion object (...
PANICORE's user avatar
-1 votes
1 answer
441 views

Unable to access ContentVersion.VersionDataURL field

In the documentation of ContentVersion object, VersionDataURL field is mentioned. But when I'm trying to query the same in an Apex class, it is throwing an error saying - Error : No such column '...
HG_'s user avatar
  • 125
0 votes
0 answers
100 views

Cannot insert blob file as content version

I'm trying to insert blob file as Content version into Salesforce. Im getting the response in my webhook, for which I have to make a callout to another endpoint to get the blob data. Once I got it, I'...
Anirban's user avatar
0 votes
2 answers
379 views

What is the order of execution in content related objects?

I have a scenario to insert the content document link for sharing the contentdocument with contentworkspace (library) when the contentdocument is created. I want to write a trigger to achieve this. I ...
riseAJdev's user avatar
1 vote
1 answer
642 views

I need to convert a String to Blob within a Flow for the VersionData field on a ContentNote/ContentVersion type

I'm trying to insert a File (ContentVersion) or ContentNote with Rich Text within a Flow. But has anyone encountered the need to convert a string to a blob (base64 encoded type) in order to get a ...
rmarq423's user avatar
  • 967
1 vote
1 answer
674 views

Update ContentVersion custom field by user with Salesforce Platform license

I have ContentVersion record with custom field Status__c. I have apex code updating Status__c field. It is working correctly if I use user with Salesforce license. The updating user is not owner of ...
rstrader's user avatar
0 votes
0 answers
65 views

i've a contentVersionId for which i'm creating a content distribution but i'm receiving INSUFFICIENT_ACCESS_ON_CROSS_REFERENCE_ENTITY,

public static string getDocumetDistribution(Id contentVersionId){ list <ContentDistribution> contentDist1 = [SELECT Id,ContentVersionId,DistributionPublicUrl FROM ContentDistribution ...
Muhammad Refaat's user avatar
-1 votes
1 answer
145 views

Batch Import ContentVersion data via the REST endpoint

I am trying to upload a large amount of photos for Salesforce via the /sobjects/ContentVersion REST endpoint. Currently I am able to use this endpoint to upload one photo at a time. Is there a way to ...
EchoNano's user avatar
  • 101
0 votes
0 answers
244 views

Overriding Upload Files button in Salesforce Related List

Requirement is, asking certain question from user before they upload any files in to the system like it has any sensitive information etc. For that I wrote a custom component with <lightning-input&...
LWC_Beginner's user avatar
1 vote
1 answer
257 views

How to convert a JSON string stored in a Content Document back to a Map and merge it with a Map of similar type? [duplicate]

I have a Map of type - Map<String, List<List<LineInfo>>> valuesMapOne = new Map<String, List<List<LineInfo>>>(); This Map is serialized and saved into a ...
Knight of the Vale's user avatar
1 vote
1 answer
282 views

Locate File IDs of contentVersion and attachment objects that contain a specific word within them

The need is to compile a list of fileIDs of 2 types of Salesforce files that contain a specific word within them. Document Files in ContentVersion Email Attachment files in Attachment When using ...
Eashwer B. Iyer's user avatar
0 votes
1 answer
317 views

Trigger for Content Version (SNOTE) before Insert

I need to prevent ALL Users from creating a new Enhanced Note (we ended up creating our own object because we needed more customization). I'm trying to write a trigger but am getting stuck on an ...
Heather's user avatar
  • 51
0 votes
0 answers
370 views

Cannot insert ContentVersion Apex code

Hello I am having problems to create a ContentDocument with Apex code. I am trying to create those records from a partner user community that has some permission set. I get the next error when trying ...
TechGuy's user avatar
  • 97
0 votes
1 answer
1k views

SOQL Query for to fetch Content Version documents of Parent to do data update activity?

We have a requirement where when we close the work order, we have to set custom field value "Allow Archieving" to true on it's content versions documents. For this, I have already written a ...
SFDCDJ's user avatar
  • 1,834
0 votes
1 answer
160 views

File created date is not shown in lwc

I can only find the created date value in the content version object,when I query this field -createddate ,I get only the created date of the record not the original date when the file was created. Is ...
tomjerry's user avatar
-1 votes
1 answer
218 views

How can I create custom addError message in ContentVersion trigger?

I have a trigger that will prevent the user to upload file but the error message in ContentVersion is being overridden by Lightning. How can I create a custom error message? trigger CDTrigger on ...
ratRiot01's user avatar
0 votes
0 answers
74 views

How does After Trigger works when using addError in ContentVersion object? Is the file successfully uploaded or not?

I have a custom object with related files in a page layout. Now if user click the 'Upload files', I want to prevent user to upload a file. Seems like I cannot use 'before trigger' because I cannot ...
ratRiot01's user avatar
-1 votes
1 answer
95 views

Variable does not exist: ContentNote

We are trying to create the version of the 2GP managed package in a Scratch Org in Salesforce. But Getting alot of Errors related to 'ContentNote'.kindly Suggest us the solution for this error.
umair's user avatar
  • 1
0 votes
1 answer
1k views

Import Files and Attachments to the ContentVersion object using CSV file and Dataloader

I am working on migrating files from an old SF org to a new one. I have done a data export on the required files and documents using the native Data Export tool in the Setup. That gave me the ...
Wesley Klein's user avatar
1 vote
0 answers
228 views

How to enable object SharingRecordCollection in sandbox?

Context To retrieve all applicable files in the org and perform a data migration on ContentVersion records, we have created a permission set with Query All Files permission (as recommended here) and ...
Shamina's user avatar
  • 4,225
0 votes
1 answer
265 views

File encryption using Crypto in apex

I am trying to encrypt and decrypt file using apex but getting below error while decryption of file. Goal is to encrypt the file in salesforce and send it to third party. Third party should be able to ...
Muzammil Bajaria's user avatar
0 votes
1 answer
370 views

Variable does not exist error while trying to set custom field on ContentVersion record

I'm trying to do something relatively mundane, which is store an offset value for Timezone on a custom field on the ContentVersion object. It seems like no matter what field I reference (including ...
api-testuser45690's user avatar
-1 votes
1 answer
502 views

Inserting ContentVersion via REST API too slow

I am inserting ContentVersion (files) using the REST API endpoint /services/data/v55.0/sobjects/ContentVersion, which seems to be extremely slow. It is so slow, that it takes about a minute to upload ...
Bartu's user avatar
  • 19
-1 votes
1 answer
577 views

Uploaded a PDF but not visible on Salesforce

I uploaded a PDF to the ContentVersion object using dataloader. It uploaded successfully but when I click on it within SF it doesnt show anything. However if I download it I can see it. Any reason why ...
Hulk Buster's user avatar

1
2 3 4 5
8