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
16 views

Salesforce Files Settings - Expected Behavior?

We were looking to migrate to Files as a first step to prep for a Lightning migration and noticed a potential useful setting: "Files uploaded to the Attachments related list on records are uploaded ...
0
votes
0answers
24 views

Attachment download problem

When ContentType field on attachment is populated, /servlet/servlet.FileDownload?file= url template is being redirected to /content.force.com/servlet/servlet.FileDownload?file= url, which opens the ...
1
vote
1answer
98 views
+50

How to download a attachment in browser using JSForce?

I am trying to download a Attachment using JSForce library. I am able to get body of attachment and download that file but somehow content of downloaded file is not correct and I am getting a corrupt ...
1
vote
1answer
418 views

unable to deserialize salesforce attachment, exception thrown

Attachment a = [ SELECT Id, Body FROM Attachment WHERE Id='00Pi000000ZdBqv' ]; String jsonStr=JSON.serialize(a); Attachment b = (Attachment) JSON.deserialize(jsonStr,Attachment.class); ...
0
votes
0answers
15 views

Problem sending email with attachment

I have a method to send email with attachment but some weird stuff keeps occuring where some emails + attachment arrived to the accounts that are returned by the query but some didnt receive anything ...
0
votes
1answer
436 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
632 views

How can I bulk-upload PDF attachments to custom objects then attach those PDFs to a mass email campaign?

I work at a company that runs summer programs. One of our vendors is sending us approximately 1,000 student grade reports as PDFs. The files will all be named consistently (i.e. John Doe Grade Report....
0
votes
1answer
470 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(...
2
votes
2answers
384 views

Email sending - multiple attachments

I need to attach multiple attachment through url when doing Send An Email. When I press a custom button through vfpage, it redirects to url from there I can send email with attachment. I need to send ...
1
vote
2answers
45 views

Converting attachment to files, heap size exceed exception

I am trying to convert our existing attachments to contentVersions using batch. But problem I am facing is that some of the attachments are of size greater than 12Mb. So when I try to run my batch I ...
0
votes
1answer
19 views

Optional parameter in apex (sending email with PDF)

I have Messaging.SingleEmailMessage method return type that requires several parameters when its called, the code is below; public Messaging.SingleEmailMessage createEmailMessage(Id templateName, Id ...
0
votes
1answer
25 views

Not able to view attachment in salesforce, when uploaded through Multipart Rest API

Below is the code which I'm trying to insert attachment through API not sure what is wrong, when I try to open 'Failed to load pdf' error comes or if I send image type file then that also doesn't open ...
0
votes
1answer
27 views

Community Plus users are not able to get the attachment using standard salesforce API

We want to get attachment BLOB data using the standard salesforce API. See the API Docs link below. ([https://developer.salesforce.com/docs/api-explorer/sobject/Attachment/get-attachment-id]) We are ...
2
votes
1answer
533 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 ...
1
vote
2answers
2k views

Display image from attachments in lightning component

I am trying to display images stored in attachment object for a particular contact using a lightning component but i am not able to do so i.e the page appears blank. Below is my code. ApexMethod : @...
0
votes
1answer
541 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 { ...
1
vote
1answer
34 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
1answer
461 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 ...
2
votes
1answer
470 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
18 views

Unable to append content to existing attachment

I am trying to add content to an existing attachment. However the new content is never getting added to the attachment and the file only has the original content. Below is my code: List<Attachment&...
2
votes
1answer
39 views

Insert attachment via Apex failed

When trying to insert new attachments, sometimes I come across this error: Insert failed. First exception on row 1; first error: UNKNOWN_EXCEPTION, BlobField : U#360.3fffffff (Attachment) U#360.aff (...
0
votes
1answer
676 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 ...
1
vote
1answer
3k views

Attaching PDF rendered Visualforce pages to Standard Object?

I've created a visualforce page on the Opportunity object that I'm rendering as a PDF. I just started using docusign and would rather not have to generate the doc, attach it to the record and then ...
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
556 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
710 views

How to download file in visualforce page whose path is stored in a field?

I have a 'document' object in which i have a URL field 'document_URL__c', this URL field have public site and the attachment id. for eg: 'pxx-pxx.cs5.force.com/servlet/servlet.FileDownload?file=...
3
votes
0answers
104 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
0answers
27 views

Adding attachment to the Email using Rest API

I am calling API EmailMessage and storing email-related content, Now I have attachments in email so how can I set it on a particular email using REST API? What I am using is this: https://developer....
0
votes
1answer
27 views

Salesforce Files - Is it possible to link a file with Case + specific user and skip it from Content Document link API call?

We've a use case where our customer wants us to link a File record to Case but not fetch it via Content Document link API call i.e. mark it private for selective internal Salesforce users. In nutshell,...
0
votes
2answers
634 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
620 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 ...
3
votes
2answers
758 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
20 views

File preview issue of ContentVersion data that is copied from Attachment Body blob

I've created my own custom Solution object for SF Lightning use. I'm trying to migrate existing SF Classic Solution's Attachment Body blob data to ContentVersion versionData blob data. Below is the ...
1
vote
0answers
22 views

Image getting rotated while inserting in rich textarea field using attachament

Facing this problem while uploading image using iPhone salesforce one app. In the attachment the image is showing right, but when the same image from attachament is inserted into rich textarea it is ...
0
votes
1answer
419 views

write test case for file upload functionality

I have a upload feature that takes a file from user(only pdf allowed) on visualforce page and then insert it in notes and attachment section of a record.My code works perfectly fine. However, I don't ...
0
votes
1answer
48 views

Can I have PageReference within PageReference?

I am working on this requirement. I have a SaveAction() pagereference method in my controller on the Button click from the Input VF Page, where I am saving the VF page's input field values to an ...
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 = ...
0
votes
0answers
18 views

Downloading The attachcament gives Blob result in csv`

I have made a lightning component to download the attachment associated with a custom object record. The downloading is working perfectly, however the downloaded file is opened with blob data. The ...
0
votes
0answers
19 views

Unable to share an attachment with Community User / record owner

How do I: Share an attachment with a Community User, who owns the record. In this case, the Community User owns the Opportunity and Account, and the attachment is in the Opportunity Configure ...
0
votes
1answer
22 views

Limit only one pdf in attachment/salesforce files per object record

I have a requirement where i need to make sure only one pdf can be uploaded via attachment or salesforce files in an object record. In case user tries to upload another pdf in the same record it ...
1
vote
1answer
889 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
1answer
56 views

Generating a PDF and attaching after clicking on Submit from VF page?

I have a simple Contact creationg VF page with bunch of input fields. Clicking on the Submit button would create a Contact record and shows a confirmation message on the screen. Now, I would like to ...
16
votes
2answers
805 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 ...
1
vote
0answers
16 views

How to give Content Type while downloading attachment from url?

I am trying to download attachment from link : <a href="{!'/servlet/servlet.FileDownload?file='+attachment.Id}" target="_blank">{!attachment.name}</a> but the attachment is being ...
2
votes
2answers
69 views

Calling REST APIs based on a session established via a community login

I'm currently dealing with an authentication issue with two different Salesforce REST API endpoints. We are trying to consume the API from inside a Visualforce page in a Salesforce community. To do ...
0
votes
0answers
42 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
1answer
44 views

Can I force Google Chrome to download Salesforce Image Attachments?

Whenever I click View or Download on an Attachment in Salesforce, if it's an image, it simply previews the image in my browser. For every other file type, I get the usual file download. Is this a ...
2
votes
1answer
47 views

Salesforce Files - Integration related queries

While Salesforce is pushing adoption of Salesforce Files, here are few questions from an integration product point of view: Is it mandatory to convert older attachments to files? What is new object ...
0
votes
1answer
33 views

How to send a email(pdf visualforce page) to particular user on clicking the custom button? [closed]

I have made a visualforce page to generate a pdf when a custom button is clicked and I'm struggling to send the generated pdf to mail id of that particular user.I tried all the possibilities.How ...