Questions tagged [contentversion]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
22 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
51 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
85 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
46 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
44 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
17 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
82 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
31 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
60 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
44 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
221 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
25 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
57 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
316 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
76 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
227 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
405 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
  • 957
1 vote
1 answer
447 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
48 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
90 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
177 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
185 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
217 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
212 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
54 views

How to view the history of all versions of an article in list?

Please tell me, I am making a request to Salesforce to receive articles, is there any option to do something like an inner join or something so that when I make such a request /services/data/v52.0/...
Maria Kamenskyh's user avatar
0 votes
0 answers
300 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
0 answers
166 views

How to Append Content Document title in Salesforce

So I'm having an issue where MS teams invites are being sent to CASE queues for group meetings. This results in with a file being created which gets downloaded sometimes and sent to others. The file ...
Cody Barnes's user avatar
0 votes
0 answers
82 views

ContentVersion - Problem is to not save the note if it has a specific sensitive data

Issue is - While creating a new note if user enters a specific sensitive data like PAN he should get an error & the user should not be able to save the note like disable the ‘Done’ button or ...
P. Chak's user avatar
  • 11
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,814
0 votes
1 answer
120 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
165 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
67 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
83 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
0 answers
60 views

ContentVersion Images not being retrieved in Mobile Browsers

I am storing images for LWCs as ContentVersions so that I can upload them as Files related to a Custom Object. These images show up completely fine in desktop browsers, however, I can not seem to get ...
user125997's user avatar
0 votes
1 answer
817 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
0 votes
0 answers
81 views

Not able to call apex method from LWC in lightning flows

I am trying to call an apex class which returns a list of a wrapper class consisting of contentVersionID, filename, documentID, custom URL, and document_Type__c. I introduced the LWC component in the ...
ADITYA VAIBHAV's user avatar
1 vote
0 answers
209 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,175
0 votes
1 answer
229 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
311 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
416 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
460 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
0 votes
1 answer
88 views

Post request with polymorphic field on the body

I am trying to send a post request to ContentVersion to migrate my contentVersions from point A to B : i build the body like this : body = ('{"Title" :"'+Title+'", &...
Amir Bouzid's user avatar
2 votes
1 answer
858 views

What controls ContentVersion access in non-sharing apex class?

I recently wrote an apex class which queries the ContentVersion records for a lead and embeds them in a PDF page. The class is not running with Sharing, so system access, and everything is working in ...
Tezyn's user avatar
  • 346
1 vote
0 answers
288 views

Display folders for an object according to a picklist value using lwc

Hi all I have an object name FS where I have uploaded various files in each records. Also in the content version record I have a picklist value named Category which has certain picklist values New and ...
user121495's user avatar
-1 votes
1 answer
2k views

update ContentVersion using rest API

I have some data on the ContentVersion object. I want to update the field VersionData in the ContentVersion object using REST API. Here is some more detail about the API. Endpoint: https://mysite.my....
Muhammad Hamza's user avatar
0 votes
0 answers
637 views

Sending an image as a POST request

I am trying to make a POST request to Eventbrite API to send an image from Salesforce along with other parameters. Under the hood Eventbrite is using Amazon AWS S3 bucket. When I send the request ...
Krishnamurthy's user avatar
2 votes
1 answer
94 views

REST endpoint ContentVersion creation succeeds in synchronous mode but fails in Queueable for site guest user

I have a REST endpoint that, when called by a guest user, creates a ContentVersion file. When the process happens synchronously, the ContentVersion file gets created without issue. However, when the ...
Natalya Murphy's user avatar
1 vote
1 answer
270 views

Uploaded audio file to salesforce ContentVersion getting corrupted

I need to upload a Zoom recording as ContentVersion to salesforce using the recording file donwload_url. What I've done so far is this: // Get download_url field from Zoom file returned by api const ...
letie's user avatar
  • 111
2 votes
2 answers
2k views

LWC download shows 'errorduringprocessing.jsp'

On our customer portal, we provide the option to download ContentVersion from Salesforce using the following endpoint: /sfc/servlet.shepherd/version/download/{ContentVersionId}. And we open it with ...
Bartu's user avatar
  • 19
1 vote
0 answers
79 views

Encode/Decode ContentVersion Rest API Export and Upload [duplicate]

I’m working on a small python script to export ContentVersion records from one Salesforce org and migrate them into another. I’m using simple-salesforce. I am able to export the ContentVersion and the ...
Andrew Cann's user avatar

1
2 3 4 5
8