Skip to main content

Questions tagged [contentversion]

The tag has no usage guidance.

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

UNABLE_TO_LOCK_ROW on ContentFolder when attempting to create ContentDocument

Recently the primary admin user of a production org has intermittently different types of jobs and batches failing with the following error: "First error: Insert failed. First exception on row 0;...
Felix van Hove's user avatar
0 votes
1 answer
30 views

ContentVersion is not visible but CDL is

The SharingPrivacy (File Privacy) is set as "Visible to Anyone With Record Access". I've a screen flow (running in system mode). This flow is on the Account record. It is supposed to get all ...
flowgician's user avatar
0 votes
1 answer
67 views

Salesforce Apex - POST multipart/form-data Content-Type + TEXT

This is the second case that I open regarding this topic to ask more specific questions (the first Using blob variables in apex code) In the first one they already indicated to me a first solution ...
Banzoni's user avatar
  • 31
0 votes
0 answers
36 views

Can't share a file because it's managed by library , How to share a library then?

i want to create a public link for a file , Class : public void execute(Database.BatchableContext BC, List<Challenge__c> scope) { Set<Id> testIsd = new Set<Id>(); ...
Fark's user avatar
  • 27
0 votes
1 answer
48 views

SOSL query on ContentVersion not returning consistent results for all users

I need to search for keywords in some files in Salesforce. I am using the following SOSL query for the same: FIND {search_term} IN ALL FIELDS RETURNING ContentVersion(ContentDocumentId, FileExtension, ...
it-nish's user avatar
  • 21
3 votes
0 answers
55 views

Why doesn't ContentVersion Query doesn't respect OFFSET when you include VersionData?

I have some code where I have to be careful about how much ContentVersion data I load into memory at any particular time to avoid blowing the heap limit. I was planning to do an initial query on ...
Aidan's user avatar
  • 13.8k
2 votes
0 answers
51 views

Content Version before trigger data inconsistency issue

I have a before update trigger on content version to update the data of notes object in apex . It is working sometimes but sometimes in the before update the new updated value is not showing . For now ...
NewBaySales's user avatar
0 votes
0 answers
23 views

Content Note Owner loses access to edit Note after an edit by other user, wanted to retain the edit access for owner

If user A creates & owns the note and later other User B updates the same content note then after the update User A will not be able to edit the same note even though User A is the owner. [This ...
Ravi Roy's user avatar
1 vote
0 answers
56 views

Possible reason for inserting a ContentVersion causing a row lock error on ContentFolder?

I've got some code to insert a ContentVersion in a Queueable so that it can be read later by another Queueable or a Platform Event once all the files are prepared. The insertion is nothing fancy: ...
Aidan's user avatar
  • 13.8k
0 votes
0 answers
30 views

How to give edit access to certain users for ''File Privacy on Records'' field in content version object

I need to give edit access to certain users for ''File Privacy on Records'' field in content version object but in permission set i couldnt find the object content version and even in field level ...
Zoya's user avatar
  • 11
0 votes
0 answers
51 views

API not loading CSV file for Decision Matrix Rows

Using the Salesforce Business Rules Engine, I am able to manually upload a CSV file associated with the Decision Matrix Version to provide the header and rows used for Input and Output values. I am ...
Gunnar's user avatar
  • 101
2 votes
1 answer
79 views

Blob.valueOf() creates corrupted .zip for application/octet-stream HttpResponse

I am trying to put application/octet-stream HttpResponse body to a .zip file (ContentVersion). I am doing it like this: insert new ContentVersion( Title = title, PathOnClient = title + '.zip',...
Mariia Illarionova's user avatar
3 votes
1 answer
49 views

Store Lightning Dashboard as PNG in Files

The use case here is that I need to fetch the image/png of Lightning Dashboard and store it in Files via Apex So first, I try to do a callout to Dashboards REST API - Http http = new Http(); ...
Aditya M's user avatar
  • 420
0 votes
0 answers
181 views

Unzip password protected zip file and save the extracted files in Content Version record using LWC

I am working on a problem statement where we need to pick a zip folder from Files related list on Case and then Unzip it and save the pdf files back to Files on same case record. The zip folder is ...
Sharma_raj's user avatar
0 votes
0 answers
14 views

Capture EXIF Data in Salesforce and Delete [duplicate]

IS there a way to capture data on image(EXIF data) while an user tries to upload a image file into chatter and delete the data on the image file?
Niteesh bharadwaj's user avatar
0 votes
1 answer
120 views

Accessing ContentVersion file data from Lightning web component

We are trying to build a zip download feature for documents. The zip can contain files stored in ContentVersions and external files. It works fine for external files. But due to CORS, we cannot access ...
Andreas Tschritter's user avatar
0 votes
0 answers
45 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
554 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
0 votes
2 answers
338 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
25 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
39 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
105 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
174 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
228 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
  • 789
1 vote
1 answer
64 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
  • 789
0 votes
0 answers
84 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
2 answers
335 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
638 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
59 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
1 vote
1 answer
800 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
241 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
87 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
89 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
19 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
593 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
67 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
214 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
97 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
499 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
-1 votes
1 answer
689 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
  • 117
0 votes
2 answers
725 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
1k 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
  • 977
1 vote
1 answer
940 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
91 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
259 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
1 vote
1 answer
358 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
379 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
486 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
  • 73
0 votes
0 answers
434 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
  • 117

1
2 3 4 5
8