Questions tagged [attachment]

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

Filter by
Sorted by
Tagged with
2
votes
0answers
15 views

Sending a File by email in Classic creates an attachment: how to prevent this?

Salesforce is gently pushing us to use Files and not Attachments. However, in Classic I seem unable to prevent the creation of new Attachments. In Setup, there is the option "Files uploaded to ...
0
votes
1answer
490 views

How can i print multiple attachments simultaneously from custom visualforce page in Salesforce?

I have a custom visualforce page where i can see list of attachments in pageblock table. I need to print all those attachments. there are two ways Have a print button on the above table - when i ...
1
vote
1answer
425 views

Convert an apex attachment into a blob?

I am attempting to convert an apex attachment into a blob. My visualforce code is <div class="mt-5 row"> <div class="d-flex justify-content-center col-lg-12"> <...
0
votes
0answers
30 views

How to create a PDF attachment based on the lightning-input-rich-text value?

I have a requirement to create a pdf attachment from the value that the user saves in lightning-input-rich-text. Basically I need the to convert whatever the user has composed in Rich text editor as a ...
0
votes
1answer
503 views

Apex Trigger - Move Attachment - Account to Opportunity

When you add an email to Salesforce using Salesforce for Outlook, the email is added as a new task. When you add email attachments using Salesforce for Outlook, attachments are included on the ...
0
votes
1answer
522 views

Single Email message with attachment not sending email

I want to send a email with attachment, for that using below code public Attachment attachment { get { if (attachment == null) attachment = new Attachment(...
1
vote
1answer
18 views

Issue with renaming Attachments with Accents in File Name- Bulk upload

I am working on bulk loading of Attachments and as per SF documentation, after Data export, I renamed Attachment names using 'bat' file. Everything went fine except for the Attachments that has Accent ...
0
votes
0answers
18 views

Migrate Attachments as a Content Document in other org

I am migrating the data from one org to another org. Let's assume Source Org as S (from where I need to migrate the data) and Destination Org as D (where I need to insert the Data). Now in org S, ...
0
votes
1answer
663 views

CombinedAttachments Table subquery is not returning any result in Test class

In below test class method, the subquery is not returning any result even after inserting the attachment. Test CLass : @isTest private class AttachmentRelatedListController_Test { ...
2
votes
1answer
717 views

Visual Workflow - Issuing with copying email attachment to new email

I am trying to create a flow that can duplicate an email message including attachment onto a new case from an existing case that has been closed. So far I have been able to create the flow as ...
3
votes
0answers
167 views

No such column 'Description' on entity 'Attachment'

I am using salesforce partner web service API Version 42.0. I call description field from attachment object. This attachment is in the custom object I created. And somehow got this error. System....
0
votes
1answer
56 views

Unable to upload large files (not above 4MB) as attachment with apex class method from LWC. How to overcome this issue?

LWC method to convert selected file content to base64 String and call the apex method for uploading as related Notes and Attachment on a particular record myComponent.js const toBase64 = file => ...
3
votes
3answers
1k views

Get the image in file - lightning experience

I have to display an image in a lightning component. So in Salesforce classic I put this image in an attachment related to an object, but in lightning experience there is no attachment, or I didn't ...
0
votes
0answers
23 views

Upload Visualforce PDF to Files Related List Using Apex (getContentAsPdf() and Future Method Issue)

I'm currently trying to upload my Visualforce-rendered PDF to the Files related list of my record. I understand PageReference and getContentAsPDF() both behave as Callouts and thus needs to be ...
0
votes
1answer
28 views

Where can I view attachments that I've uploaded to salesforce using a REST api?

response = requests.post('https://%s.salesforce.com/services/data/v29.0/sobjects/Attachment/' % instance, headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % sessionId },...
0
votes
1answer
40 views

How to get base64 from Body__s field on Salesforce Classic Knowledge

I am trying to get the base64 encoded version of a Salesforce Classive File Upload field type via the Salesforce REST API from one org to another. However when I query the rest API for the knowledge ...
0
votes
1answer
18 views

Can't get attachment data from outbound email via Apex

Has anybody got experience or ideas how I can resolve the following issue please? We're trying to query attachments sent via outbound email from the email related list on case, so that we can copy the ...
0
votes
1answer
36 views

Parent ID not updating on Attachment [closed]

I have a requirment where when 2 records are merged, the attachment related to merged record should be inserted to parent/master record. Below is my code related to this List<Attachment> attObj =...
2
votes
1answer
507 views

rerender input file losing file.?

I am rendering <apex:inputfile> by adding a new row but I am losing file when I click add row button. I am able to add a new row but the path is lost. Please help! <apex:repeat value="...
0
votes
0answers
17 views

View attachment button tries downloading file instead previewing it onsite

When "VIEW" button is pressed on attachment record files of type ( .doc, .docx , .msg ) etc gets downloaded instead opening automatically without downloading. This was how it was working ...
0
votes
2answers
2k views

Select attachments from notes and attachments in send email

Is it possible to use attachments from notes and attachments in send email. If person A attached some files to account in Notes and attachments. IF he click on send email button, to attach these files ...
1
vote
1answer
598 views

Getting Attachment Id with subquery using rest api in c#

Hey guys i am trying to get attachment Id in a subquery via the rest api in c# here is my query: SELECT Id, Name, First_Name__c, Middle_Name__c, Last_Name__c, (SELECT Id FROM Attachments WHERE Name = ...
0
votes
1answer
885 views

Upload an attachment from visualforce page and sent it to external server

I need to upload a file from the visualforce page and sent the file data to the Apex controller class. From that class I need to sent that file data to my server(Using Apex HTTP Callouts). My ...
0
votes
1answer
65 views

Prevent file from being duplicated as email attachment - Apex

I've button when i click on it it generates new file , i want to attach that file to email The problem i'm facing is that i found duplicate attachments when i click on button twice , 3 attached file ...
0
votes
0answers
30 views

Read visualforce as pdf in the attachment and display it in record page (attachment is blank)

I'm creating a visuaforce page as pdf to display some account and opportunity fields in pdf. But when I try to read the pdf and add it into attachement I find that is blank. Please could you help me ...
0
votes
1answer
26 views

Blank PDF attachment when try from site

I have a site, when a guest user insert some data into a inputText it triggers a record creation (HojaEntrega__c object and child records from HojaEntregaItem__c object), then an attachment creation ...
0
votes
1answer
18 views

Identifying attachment type

I am attempting to identify the format of attachments which come in emails entering my Email Service in order to determine if an attachment is a .csv file. I was guided to use this as my solution : ...
0
votes
1answer
1k views

Finding records of an object type that has any attachment

I need to find whether records of a object type have any attachment on them or not. I see that below query doesn't work. SELECT Id, ParentId FROM Attachment WHERE ParentId like '001%' . Is there a ...
0
votes
0answers
29 views

Fetch Document Blob value from files

I am trying to create an Apex REST API to get documents from "Files". I want to get the document as a binary/blob value. I used the Rest Explorer in Workbench and could figure out the query as: /...
2
votes
2answers
431 views

Sharing settings on accounts, cases, emails and attachments

We have a requirement in which we need to make some accounts private. We do this by flagging the account with a deleted field. This flag is used in our sharing settings. We are using the exact same ...
1
vote
2answers
34 views

Same Image Preview getting displayed for all attachments

I am trying to display respective attachment preview on a VF Page, but if you can see below picture of my VF page, same image is getting displayed for all attachments, not sure where i'm going wrong ...
2
votes
0answers
229 views

Sending 100KB attachment via HTTPRequest throws System.UnexpectedException

I'm trying to upload an attachment from SF to a third party server using REST API, First, my third party does not support base64 content-transfer so I cannot send from SF a base64 attachment. ...
0
votes
2answers
705 views

Trigger to create an attachment

I have a requirement where an attachment has to be auto created whenever a record on Object A is Created. The attachment is a child to Object A. And the attachment type is ".docx".I dont have a ...
0
votes
1answer
687 views

Notes and attachment related list questions

1) A user wants the notes and attachment related list for certain types of documents (i.e. finance related) and another related list for other types of documents (i.e. management). Anyone know how to ...
0
votes
1answer
176 views

Unable view the attachment saved as pdf Blob

I'm getting a base64 String pdfContent from a callout response which I'm trying to save as a attachment of a record. I tried to save it after decoding it with EncodingUtil.base64Decode('base64String'...
0
votes
2answers
77 views

How do I get correct base64 data present in VersionData field in ContentVersion through jsforce?

I am using jsforce to query VersionData field in ContentVersion object. However, it returns me the URL to the base64 data instead of the actual data. If I make a GET request to the URL (using the ...
0
votes
0answers
46 views

Attachfile Ampscript function not working

My goal is to add an attachment to my email via ampscript. That's why I was looking at this guide and used this code: var @fileName, @fileAlias set @fileName = "testAttach.doc" set @fileAlias = "...
1
vote
1answer
1k views

How to open/ retrieve the actual attachments from the zip file from weekly data export

I have a urgent requirement. 1 ) Please tell me ( possibly via steps ) how to open/ retrieve the actual attachments from the zip file which I got when I did the weekly data export . I mean which ...
0
votes
2answers
18 views

Error posting request to add attachment via chatter rest api. version 30.0: “Unrecognized field attachment”

I am trying to post an attachment into the chatter feed of a bug item in GUS. Working with api version 30.0, and using the api reference for this version at: https://developer.salesforce.com/docs/...
0
votes
1answer
259 views

Public Site with access to attachments

I am currently creating a public site. This site should display attachments that are attached to a custom object. My plan was to first load the ContentDocumentLink of the object and then the ...
4
votes
1answer
670 views

Is it possible to download ALL Case Attachments as 1 file?

Our cases have most often 3-5 files attached. On the Case page, I can see the files listed. Is there a way to download ALL attachments together? With out the need to click on each of them?
1
vote
0answers
33 views

Adding attachment on chatter feed via chatter rest api: How to write contents of binary file in the request

I am uploading files (attachments) to Chatter for specific items, based on [this][1] rest api reference. The image files are being created but are not usable, cannot be opened as image files from GUS....
0
votes
2answers
931 views

How can I attach the visualforce page pdf?

I have a visualforce page renderas="PDF". But I need to attach this pdf to a record in custom object. I have custom button to open this pdf but this is just enabled if the checkbox field in record=...
1
vote
2answers
1k views

How to attach file to Feed Item in SOAP API v36

Can someone give me an example of how to attach a file to Lead using FeedItem in SOAP for version 36 since ContentData and ContentFileName fields are obsolete? My previous code was FeedItem post = ...
16
votes
2answers
873 views

Is forcetk accessible in Communities

I am using forcetk to upload files (as Attachment records) in a VisualForce Page and it works fine. But when I access same page in a Community, I am not able to upload the file as I am getting the "...
2
votes
2answers
1k views

Images are fetched from attachments for Visualforce page rendered as PDF displaying broken images

I am trying to fetch the images from the attachments and trying to display these images in a visualforce page which is rendered as pdf. But in the pdf I am getting broken images. If I remove the ...
0
votes
1answer
594 views

Getting all attachments for a record in a visualforce email template

When sending an Email via a Visualforce Email Template, I would like to get all attachments I have for an Opportunity record. I found this page very helpful: Insert Attachment into Visualforce Email ...
0
votes
1answer
70 views

How to share an attachment using url?

I am new to saleforce and I used the following code to save files to the Attachment object in salesfore: String base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); Attachment attach = new ...
0
votes
0answers
5 views

Salesforce to Salesforce How to send Email History and attachments and Libraries from Source org to destination org

I have enabled salesforce to salesforce, and able to send the record from one org to other org, but the attachments and email messages related to record are not getting shared which are stored in ...
0
votes
0answers
28 views

Even after having the value in .csv file last column , apex is taking it as null and not able to insert that last column field in object

CsvAttach__c csv=new CsvAttach__c(); String[] fieldsData=readArray[1].split(‘,’); For(Integer j=0;j<2 ;j++){ if(String.isNotEmpty(fieldsData[j] && field[j]==‘Subject’){ csv.put(Schema....

1
2 3 4 5
13