Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
0 votes
1 answer
415 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
2 votes
1 answer
109 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
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
0 votes
0 answers
156 views

Integration batch job + Data Encryption : Need some suggestion

I have written a batch job to push Open Case record every one hr from Salesforce to External system using REST API. I need to Encrypte the data and push it to the external system. Below is the Class ...
Tamil's user avatar
  • 750
2 votes
2 answers
3k views

How to get Binary Data to submit to REST API

I'm attempting to use curl and multipart message to attach files to a created record. I am successfully able to do so, however the file is corrupted when I view it. I think I may not be getting the ...
Shuaib Ahmed's user avatar
1 vote
1 answer
2k views

How we can read Content Version body and update in Long rich text area field of an object?

I have file attached (Word Document) to the custom object record . I want read the file and get the content between some text and store it in the Custom object record field apex: ContentVersion con =[...
sfdc1100's user avatar
0 votes
1 answer
4k views

ContentVersion to File Attachment in Email | APEX [closed]

I am trying to get the Blob Version Data from the ContentVersion in Apex class and send it in an Email using the Following Code: Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage();...
Simple Code's user avatar
1 vote
1 answer
1k views

How can I get content version data without making self callout?

I understand that there are several approaches to get content version data. The default and widely accepted approach is to make self-callout to REST API to get VersionData of VersionData field on ...
Patlatus's user avatar
  • 17.8k
0 votes
1 answer
1k views

Merging Docx files into one - Apex

I have a requirement, which I should merge two or more word files (.docx) together into one file. because I can't do arithmetic operations on Blob - I converted it to hex, made the arithmetic, ...
Salvation's user avatar
  • 1,209
0 votes
1 answer
265 views

ContentVersion apex decoding [closed]

we are saving a docx and pdf files in contentversion. But having issue in decoding it back. Blob.tostring doesnt work as the files encoding is not in the UTF-8 formatting. Can you please help me ...
Anu2112's user avatar
2 votes
2 answers
1k views

BLOB is not a valid UTF-8 string for the Contentversion of einstein_platform.pem file

In Einstein Playground app developed by the Salesforce Lab, I have uploaded the einstein platform service private key file named einstein_platform.pem to complete my einstein platform service setup. ...
Md. Abdur Razzak's user avatar
2 votes
1 answer
437 views

Why Blob equals doesn't work if one of the Blobs is retrieved from ContentDocument?

In brief, I can't test the value stored in a ContentDocument. Even if the value of the two Blobs is the exact same, equals would return false. Do someone know the reason? Here's a unit test to check ...
Francesco Pitzalis's user avatar
0 votes
1 answer
984 views

How to Upload ContentVersion into OneDrive using Apex?

I am unable to send a png file from Salesforce ContentVersion to Microsoft OneDrive. Below is my code: for (ContentVersion cv : ListFilesToBeUploaded) { Http http = new Http(); httpRequest ...
Prateek Garg's user avatar
4 votes
1 answer
775 views

Body not a variable of ContentVersion?

I am drafting up a couple of unit tests for this code. Here is what the code looks like so far: public class ContentController { public ContentController() { file = new ContentVersion(...
isakbob's user avatar
  • 181
3 votes
2 answers
4k views

File Attachment not working when attaching crm Content

I have a page where the user selects content (that is 5MB or lower, only 2 attachments allowed per email) to use as an attachment in an email. It all seems to work fine, the email sends and there are ...
SalesForceGirl's user avatar