Questions tagged [attachment]
A standard Salesforce object representing file attachments related to another standard or custom object.
693
questions
0
votes
0
answers
10
views
How to avoid spread of malicious files?
I'm coding integration between Salesforce and our internal systems, but how can we be sure that the content as a file or attachment added to a case is safe? Do you do scanning of the content, or how ...
2
votes
2
answers
43
views
Does SOQL query on Attachment Object needs to be done asynchronously?
Problem statement:
External system is creating a custom object record and placing an attachment to the same record via composite REST API. After Insert trigger code that runs immediately for further ...
-1
votes
0
answers
17
views
How to insert a file in Apex which is physically on third party?
I'm inserting a file in "OneDrive" from Salesforce via "OneDrive" API. In API response we recieve the webURL of the file inserted on OneDrive. Now we need to insert this file in ...
2
votes
1
answer
70
views
Zippex cant create file with Swedish character
I have problem with Zippex encoding. When I create archive with file name 'Check Flät', the name changes to strange symbols.
Code that create attachment:
Zippex sampleZip = new Zippex();
Blob fileData ...
1
vote
1
answer
19
views
How is attachment access controlled by record level
By looking at the permission set and profile metadata files, I don't see a place defining the access to contentDocument or ContentVersion so I originally assumed it should be controlled by parent. ...
0
votes
0
answers
5
views
How to mass import link to Attachments on Commerce Cloud
We have files with lists of products to import, where there are links to .pdf and .mp4 files that we have to import in the area represented in this picture, in the ‘Attachments’ area.
We tried to ...
1
vote
1
answer
34
views
How to edit Field Level Security of Attachment Object (Notes & Attachments)?
is there a way to edit the Field Level Security for the Notes & Attachments object? I've tried from both Lightning and Classic but I can't find the object and a way to edit it...
0
votes
1
answer
171
views
Render VisualForce page report of custom object to PDF and create attachment via page detail button
I have a VisualForce page which shows a report of a custom object MyCustomObject.
I have two page detail buttons, one for "Show report" only showing the report rendered as PDF and one "...
0
votes
1
answer
84
views
blob topdf as attachment PDF apex no renders background color
I'm creating an HTML string that I put in a in blob.toPDF to send PDFs as attachments
public static Messaging.EmailFileAttachment attachmentBuilder(String fileName, string attachEmailInHTML){
...
0
votes
0
answers
47
views
Attaching a file to a 'Case' object via REST API
to start with I have defined this class in C#
public class ContentVersion
{
public ContentVersion(string filePath)
{
Title = Path.GetFileName(filePath);
VersionData = File....
-2
votes
1
answer
66
views
"List has no rows for assignment to SObject" [duplicate]
I create headless quick action "Generate and attach pdf". But when i click on my action i have error "List has no rows for assignment to SObject". What is my problem?
Error
How i ...
-3
votes
1
answer
62
views
Name pdf from custom field [closed]
i create quick action "generate and attach pdf". I need name pdf from custom field on opportunity object - Invoice_number__c(Auto_number). For example INV-000001.pdf. How i can do this? ...
2
votes
0
answers
61
views
Can Files be synced with the Salesforce Connect's Cross-Org Adapter?
Can Files (ContentDocument/Links)* be synced one-way from a provider org to a subscriber org with the Salesforce Connect's Cross-Org Adapter?
I've been told "No" by the original implementer, ...
0
votes
1
answer
55
views
Is it possible to attach a file to an object record IMMEDIATELY AFTER using quick action? How?
I need to attach file to a salesforce object record by quick action. I was able to attach file by quick action using visualforce page + apex, BUT I have to use an intermediary page and a button on it. ...
0
votes
1
answer
46
views
Bulk migrate documents from legacy to Salesforce
I'm working in a data migration project and along with other data, I need to bulk migrate attachments from legacy platform to Salesforce. Is there an automated way to migrate the attachment data which ...
0
votes
0
answers
80
views
how to get versiondata parameter value by using file URL?
We are passing file URL in one custom field & want to create a content version record by using that URL. But we are not getting how to pass or get the versionData parameter of that file by using ...
1
vote
0
answers
55
views
When I open a Salesforce Attachment it is downloaded but the pdf is empty
I am getting the attachment body using the Rest API.
var config = {
method: 'get',
url: '<Domanin>/services/data/v48.0/sobjects/Attachment/00PD000000HQD68MAH/Body'...
0
votes
1
answer
161
views
Is it possible to upload binary file attachments (AttachedContentDocument) to records using the REST APIs?
I'm trying to programmatically upload a file (AttachedContentDocument) to an Account as an attachment using the REST API. This doesn't seem to be documented by Salesforce.
When I use the Lightning UI ...
0
votes
0
answers
25
views
Body of the document is not getting inserted immediately
I am trying to add some files into a zip and attaching the ZIP to a document as a body followed by which document record is created. zipUrl is being displayed on the VF page as a link (to download ...
0
votes
1
answer
55
views
How to send attachment/contentdocument to external system using Apex
I am trying to send a simple test document to the external system.
The request goes through well when I do it using Postman but as soon as I try to send similar request from salesforce it comes back ...
0
votes
0
answers
249
views
How to create contentversion by using file url?
We want to create ContentVersion related to the account object. We have one field on account which contains the URL of the file(png/jpg/pdf). And by using that URL we want to create ContentVersion. ...
1
vote
1
answer
64
views
Is there a way to upload/insert a particular custom object record and its related file document from one single csv file using data loader?
Hi it would be great if anyone could help me out with this.
I have encountered a requirement in salesforce where I have to upload/insert a custom object record and its related file attachment into ...
1
vote
1
answer
88
views
What is the maximum size of files/attachment in salesforce that can be created by external systems
What is the maximum size of files/attachment can be created under an object record in salesforce by an external system?
As per documentation its 2 GB for files and 25 MB for attachments.
https://help....
0
votes
1
answer
123
views
REST API: Get body of deleted attachment
I have an app that calls the Salesforce REST API to retrieve attachments stored in Salesforce. It makes a call like this to get the attachment body:
/services/data/v52.0/sobjects/Attachment/...
0
votes
0
answers
24
views
How to properly rename Attachment names before or after export with Dataloader/Dataloader.io?
Hello everyone and thanks for reading!
I have a request to export all the Opportunity Attachments that meet certain conditions. These Attachments are .PDF files.
I could do that using Dataloader.io ...
0
votes
1
answer
162
views
How to fetch the latest file in SOQL from each Order record
I am querying files from the list of Order records through SOQL. I have added my SOQL query below for your reference.
I want to query only the latest file which begins with 'IO_' from each Order ...
0
votes
1
answer
486
views
Read a csv file that is stored in Attachment Object
I have an excel/csv as an attachment related to an EmailMessage. I want to read the csv, process the data and create certain records(of custom object) based on that data. I want to understand how I ...
-2
votes
1
answer
184
views
Count the number of pages of a PDF stored as an Attachment from Apex code [duplicate]
Is there a way to get the count of pages in an Attachment?
List<Attachment> attachments = [SELECT Id, Body FROM Attachment WHERE ParentId = :myRecord];
I am using this SOQL to get the Body, but ...
0
votes
1
answer
101
views
(Case)controller.getRecord(); - Returning Null in the visualforce page [closed]
I'm trying to get the record that starts a visualforce page but it's returning null.
Can anyone point out the problem to me?
Visualforce:
<apex:page standardController="Case" extensions=&...
0
votes
0
answers
37
views
How to view Salesforce Files in Notes and attachments related list
Is there any way or setting to allow Salesforce Files to show up in Notes and attachments related list?
0
votes
1
answer
47
views
How to remove access to all files or attachments from a user
Just like I can remove access to a particular object, how can I remove the user's access to Files or Attachments? Right now they can still access it if they use the global search function. I think ...
0
votes
0
answers
32
views
Is it possible to create direct link in apex trigger or any other solution to ensure file attachment is required before save?
I want to create a required file section where it will pop out error if no file is attached before save?
Since the file section as in image shown cannot be created inside my custom form, can i create ...
0
votes
1
answer
217
views
How to force ANSI Encoding on a generated CSV attachement in apex?
I want to generate a csv attachement and force ANSI encoding how can i do that?
Code to create my attachement:
string rows = 'column1;column2;column3'+'\n'+'a;b;c'
Attachment attachment = new ...
0
votes
0
answers
37
views
iOS file download
I need to download a binary file on the iOS for given CombinedAttachments objects. How can I do this? I tried to generate some links, but I was only able to download the JavaScript script file that ...
0
votes
1
answer
296
views
Issue with attachment in EmailMessage created via Apex trigger
I have a logic in EmailMessage trigger to create a new case when customer replies to a closed case.
If the case is closed, I am cloning the case record to create new case. Since we cannot reparent ...
1
vote
1
answer
115
views
Attachment to File Trigger on Attachment. File not having any content after the attachment insert
Here is my attachment loop to convert into Salesforce Files. The document as Files is created along with the title and content type however it has no content or sometimes '1' or 'MQ==' which is not ...
0
votes
1
answer
68
views
Object reference not set to an instance of an object. (Attachment Trigger to Convert to Files)
I've been stuck with this trigger for 2 days now.
Essentially the trigger will convert any attachments that are generated in the Agreement Object to Salesforce Files. However upon generating ...
1
vote
0
answers
40
views
Overriding Name for QuoteDocument
We create PDFs from quotes, and they get filenames on the form VX.pdf (where X increments). So customer wants to have the filenames be -.pdf. I've tried setting the ContentVersion PathOnClient to ...
0
votes
1
answer
430
views
Visualforce - Uploading Files via JSForce/JavaScript
I would like to upload an attachment greater than 135kb (view state limit) through Visualforce and link it to a new object record being creating via a custom controller. My understanding is that I ...
0
votes
2
answers
792
views
How to get ContentDocumentId FROM ContentVersion
I have a Pdf attachment which is linked to an object in a Package. The public site is also part of the package so I do not have acces to query all files. I want to be able to let a public site guest ...
0
votes
1
answer
51
views
'Enable Notes' strange behaviour
When in Notes Settings 'Enable Notes', there are some strange situation.
They stop appear like Note records, and i don't know what object they represent now.
And, logically, they don't appear in '...
1
vote
2
answers
986
views
Upload and store 50 MB file from LWC
I have a LWC that, is retrieving the body of an attachment using apex. This is retrieved just as blob, because handling it in Apex would hit limits such as String too long os Heap Size exceeded, cause ...
1
vote
1
answer
126
views
How to insert attachment using transient variable
I am using the transient keyword to allow users to upload files greater than 135kb (viewstate limit) on a VF page however since the transient keyword doesn't transmit the attachment past the view ...
1
vote
1
answer
68
views
Count attachments by SobjectType
In a legacy org that is still using Attachments, I wanted to get a handle on how many Attachments there were per SObjectType. How can I do that with SOQL?
0
votes
1
answer
83
views
PageReference method not returning null
I have developed a Visualforce page that takes an input file from the user and does not let the user proceed to the next page only if they did not upload an attachment (attachment is null). However I ...
0
votes
1
answer
33
views
Inserting 13k PDF Attachments each 192kb in Attachments object
I want to insert 13k PDF attachments in Salesforce. Each of the PDF is 192 kb. I have created a csv file with the name of the pdf and it's relative path on the local drive.
I tested inserting 15 ...
0
votes
1
answer
55
views
Is there a way to send attachement image to Salesforces server with Web to leads forms or Web to case & with using AJAX?
So what I am looking for in an indication, because all articles I read about when it comes to sending attachment are dealing with web to lead or web to case forms with default submission!
But what ...
0
votes
1
answer
65
views
How to get Attachement Ids of sobjects for saleforce?
How to get Attachement Ids of sobjects for saleforce?
I am already attached one pdf file in one of my Account object then also its not showing here.
attachement is added as a notes.
I am not getting ...
1
vote
1
answer
117
views
List of Salesforce objects those are File types like Document, StaticResource, Contents etc [closed]
I would like to know the list of Salesforce objects whose are based of FILE type. For example Document, Attachments, ContentVersions, Static Resources etc
I would like to see what more objects comes ...
1
vote
1
answer
367
views
How to get access to attachments in Case Feed Item using Rest API
I'm doing sync with Salesforce. In my case I should sync both Case and CaseFeed items. When my CaseFeed items changed I get the notification from Salesforce and create/update the CaseFeed item in ...