Questions tagged [attachment]

A standard Salesforce object representing file attachments related to another standard or custom object.

Filter by
Sorted by
Tagged with
0 votes
1 answer
25 views

How can I make the upload of a specific attachment mandatory

I have the following situation: In my Salesforce "opportunity" object I need to make mandatory to attach specifics files in order to set the record in a specific stage. Like the following: ...
1 vote
0 answers
28 views

Chatter post with attachment not visible on record page ( Case Object)

On the Case object, when i try to post a message with attachment (with the Chatter feed component), the message doesnt appear but it's visible in the lightning page builder of the record (there are no ...
0 votes
1 answer
32 views

Visualforce Page - Word Document (.doc/.docx) - open through mobile phone (ios/android)

I have a visualforce page that is renedered in word (.doc). This visualforce is used to represent a contract document. After clicking a custom button, the visualforce page is invoked and then the ...
0 votes
0 answers
36 views

Email attachments not working in apex controller

I have an aura component that uses the following apex class. I want to attach files and send them as email attachments. Everything works fine except the attachment. The file is attached to the email ...
0 votes
0 answers
208 views

Send email with file attachment in aura component

I have an aura component and I want to send email with attachment. The files gets added to the record but it doesn't gets attached to the email. The email is send without any attachment. Component: &...
0 votes
1 answer
54 views

Using the API How can i get "file" attachment. I am able to get "attachment" correctly

I am able to list and download any item that the Type=Attachment with no issue. I can get a list of items where the Type=File. How can I Download the items that are Files? I am using Salesforce ...
  • 127
0 votes
1 answer
46 views

Can't update ContentVersion. My code create new file every time

I had such issue. I created method that save attachent to my Opportunity. public PageReference attachInvoicePDF() { /* Get the page definition */ PageReference pdfPage = Page....
  • 29
0 votes
0 answers
22 views

InputField can't be used with a commandButton that use rerender

apex:inputFile can not be used in conjunction with an action component, apex:commandButton or apex:commandLink that specifies a rerender or oncomplete attribute. This is the message I get when I press ...
  • 89
0 votes
1 answer
60 views

Usage of magic mover app [closed]

Hi all I am using a magic mover app to move files from notes and attachments to files and it works fine. Is there any way if I install this app all the existing records notes and attachments would get ...
0 votes
0 answers
36 views

How can I map the Upload / attachment to a custom field of a custom object in surveys?

I have below requirement. We are not getting upload/Attachment related questions while mirroring the questions to custom object fields. I am creating a survey. I have a survey questions which contains ...
  • 1
0 votes
0 answers
13 views

How to avoid spread of malicious files? [duplicate]

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 ...
  • 1
2 votes
2 answers
85 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 ...
  • 5,037
2 votes
1 answer
99 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
23 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. ...
  • 12.8k
0 votes
0 answers
16 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
100 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...
  • 132
0 votes
1 answer
681 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 "...
  • 165
0 votes
1 answer
308 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){ ...
  • 59
0 votes
0 answers
327 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
131 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 ...
  • 1
-3 votes
1 answer
70 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? ...
  • 1
1 vote
1 answer
178 views

Syncing Files between orgs (e.g. via Salesforce Connect's Cross-Org Adapter?)

Can anyone suggest a high-level solution for the use case of syncing Files between orgs (one-way is fine)? Preferably something that can be quickly POC'd. For us, Plan A would be to use the ...
0 votes
1 answer
56 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
129 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
144 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
91 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
417 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 ...
  • 1,218
0 votes
0 answers
29 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
270 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 ...
  • 45
0 votes
1 answer
737 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
169 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 ...
2 votes
1 answer
269 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
197 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
1 answer
410 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 ...
1 vote
1 answer
1k 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
339 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 ...
  • 61
0 votes
1 answer
213 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
1 answer
89 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 ...
's user avatar
0 votes
1 answer
383 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 ...
  • 73
0 votes
0 answers
81 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
392 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 ...
  • 83
1 vote
1 answer
249 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 ...
  • 13
0 votes
1 answer
100 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 ...
  • 13
1 vote
0 answers
71 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
608 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
1k 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 ...
  • 2,184
0 votes
1 answer
87 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 '...
  • 31
1 vote
2 answers
1k 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
176 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
177 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?
  • 63.8k

1
2 3 4 5
14