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
1answer
45 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
988 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
19 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
27 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
32 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
17 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
32 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
502 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
597 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
862 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
57 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
27 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
25 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
24 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
403 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
209 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
700 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
680 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
165 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
58 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
43 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
17 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
218 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
659 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
31 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
911 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
866 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
572 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
40 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....
0
votes
1answer
98 views

Apex Error (Image to PDF conversion) : BLOB is not a valid UTF-8 string

So i have this task where i have to convert the image uploaded in Notes and Attachment object to PDF. For that i created a trigger(before insert) on Attachment object and used the below mentioned code,...
0
votes
0answers
24 views

Is it possible to pull all Salesforce Ids as a CSV

When migrating certain Objects like attachments, there are parentid relationships that may be related to different objects/records ids. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/...
1
vote
2answers
19 views

REST API call to fetch attachment from salesforce is showing Binary response. How can i covert this Binary response to the Original file?

I am trying to extract a file from Salesforce through REST API call. I am getting the Respone in Binary File. How can i covert this Binary response to the Original file?
0
votes
1answer
32 views

How to add 2 attachments to a record created trough a force.com site without surpassing viewstate limit

I am working on a force.com site visualforce page where I create a record and want to add 2 required attachments in the same visualforce page. When I add the first attachment I reach the viewstate ...
0
votes
1answer
53 views

How to attach contentversion to record in Javascript

I am working on a solution to avoid to surpass the viewstate limit when uploading a file. Currently with javascript I create a record and create a contentversion but the contentversion is not attached ...
0
votes
1answer
62 views

How to advoid Maximum view state size limit (170KB) exceeded. Actual view state size for this page was 292.001KB

I currently have an apex class which creates an object record and attaches 2 files. I added a loop to be able to have the option to add more attachments based on counter. I currently have some ...
0
votes
0answers
22 views

How to download standard Salesforce attachment in javascript using XHR

We have a VF page. From that page, we are trying to download standard Salesforce attachment using XMLHttpRequest in javascript. We are doing GET request with attachment download URL as the endpoint. ...
1
vote
1answer
21 views

Download Attachment using php is not working for xlsm files

I'm using the below php code to save the Attachment to my server. public function getAttachmentFileFromSalesForce($fileName, $fileBodyUrl) { try { $authCode=''; $...
0
votes
1answer
484 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 ...
0
votes
1answer
40 views

Restrict users to open Notes & Attachments [closed]

We have Account object which is common for all the users and they can see all the attachments for this object. Is there any way to restrict users to open Notes & Attachments? Only Account Owner ...
0
votes
0answers
15 views

Unable to convert lead after applying custom validation rule via code

There is a requirement that if we have an attachment then and then only we can check a checkbox (i.e. isCreditCheckDone) and after then only we can convert lead into respective account and opportunity....

1
2 3 4 5
13