Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [attachment]

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

1
vote
1answer
20 views

while creating case record through vf page, i want to give option to add attachment before saving case record

I have a requirement where user should have option to add attachment before saving the case record. Currently i am creating a case using visualforce page. please suggest how can i achieve this? Vf ...
0
votes
2answers
40 views

Apex Trigger on Attachment object not being fired

I wrote this apex trigger for Attachment sObject following the answer here. The trigger basically counts the total number of attachments for a record of type Assignment__c and updates the field ...
3
votes
2answers
63 views

Need help understanding this apex trigger example

I'm just starting out in apex. I want to create a trigger that counts the number of attachments in a record of a custom object. I came across an example here. Here's the trigger code: trigger ...
0
votes
0answers
17 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 ...
0
votes
1answer
22 views

How can I batch rename attachments I've exported?

I'm trying to rename exported attachments using the mac instructions here: https://help.salesforce.com/articleView?id=000232859&type=1 But I'm receiving a No such file or directory error and I ...
0
votes
1answer
21 views

HTML link attachments and a bash script to download them all

As the title implies. I'm looking for a bash script that will iterate over html files in a folder and download the files to the same folder. I'm hoping someone in here has run into this before and hs ...
0
votes
0answers
10 views

Attaching a pdf dynamically into a transactional email (Triggered send)

I need some suggestion here. I need to attach a pdf(for e.g. a invoice copy) on user demand. Which I am trying to implement it via Triggered send. Sender system can send the PDF along with the ...
0
votes
0answers
16 views

Exporting attachments via contentType results in some .pdf coming through as .url or .html

As the title implies. Here is the code. List<Messaging.SingleEmailMessage> attachmentEmails = new List<Messaging.SingleEmailMessage>(); Map<Id, Case> caseMap = new Map<Id, ...
0
votes
0answers
17 views

Salesforce1 Android App does not preview Excel file while iOS App does

We have these excel files as attachments and when people view them on an iOS device they are properly displayed but when people view them on an Android device, the app says 'No Preview available for ...
1
vote
1answer
45 views

Best way to export records with attachments

I'm specifically trying to do this with cases. We have a script written internally to handle this but I just wanted to make sure there wasn't a better way.
0
votes
2answers
34 views

AmpScript file attachment to email

Trying to switch out the static attachment in an email to dynamic based on a Data Extension(DE). The Static: %%[ %%=AttachFile("FTP","AIDI.pdf")=%% ]%% And what I'm tried to replace it with: %%[ ...
0
votes
1answer
51 views

Upload Attachment via Rest API

I use standard Rest API (/services/data/v39.0/sobjects/Attachment) to upload attachment from our Support Portal and get saved in case object which works fine, but when I try to open the attachement ...
2
votes
1answer
73 views

Upload Attachments to Files Related list using Apex

When user attaches files on Notes and Attachments related list from Salesforce UI then files gets attached to Files and Notes and Attachments related list. But when I do it from vf page/apex then it ...
2
votes
1answer
37 views

Save PDF Visualforce as attachment - mergefields not showing

I really need your help because I'm completely stuck. I want to render a PDF from a Contract in Salesforce, and save it as a record's attachment. I followed several tutorials and I created a PDF ...
0
votes
1answer
50 views

How to attach a file to a custom object from a visualforce page in lightning experience

I need to attach a file to each record of a custom object from visualforce page in lightning experience.Here the i have tried so far but this fails to attch the file. VF Page: <apex:page ...
2
votes
0answers
56 views

Files not attached when forwarding emails (Classic)

In classic when you forward an email containing attachments, they are automatically included on the email; you see them below the email editor in the Attachments section. This is not the case for ...
0
votes
0answers
24 views

Can community users using custom REST api to upload big files (more than 25MB)

I found some articles mentioned that REST api could only upload file with 25mb size at most. However, our customers might upload a few hundreds mb for the upload files. We don't want to use default ...
0
votes
1answer
18 views

Attachment not getting saved

My vf page contains account records with its related lists that has notes and attachments i have given new attachment link which is input file and one upload button on vf page to upload attachment, ...
0
votes
1answer
233 views

What's the difference between “Files” and “Notes & Attachments” related Lists? [duplicate]

What's the difference between "Files" and "Notes & Attachments" related Lists? They seem to be a carbon copy of each other whenever I upload a file to one or the other.
0
votes
0answers
23 views

Can we upload Multiple files in to SFDC Attachment object using force-wsc jar?

I am using REST Api to upload files in to Salesforce Attachment object but can not upload multiple files in single call (no Batch). Just curious to know whether we can achieve this using force-wsc ...
0
votes
1answer
55 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
1answer
38 views

Use Salesforce Sites page in an iFrame on external site

I have a requirement to allow web-to-case form to upload attachments. Now, as per the docs there are two possible ways to do so: Implement Visualforce pages in Force.com Sites. Using Force.com web ...
0
votes
1answer
53 views

How to clone “EmailMessage Attachments” to a custom object

I'm leveraging 'Send an Email' button for a custom object(comm__c) which has a lookup to the Case object. The users sends email using this button via Related List on the case page layout. I'm ...
1
vote
1answer
123 views

REST Upload attachments - Json Deserialization failed on token 'null'

I'm using simple-salesforce to migrate attachments from one org to another. I'm encoding with base64 but am getting this error: SalesforceMalformedRequest: Malformed request https://my_org.my....
1
vote
2answers
58 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
1answer
29 views

Get attachments from related object

Is there a way to get an attachment from a related object? Example: SELECT RelatedObject__r.Id , RelatedObject__r.OtherField , (SELECT RelatedObject__r.Id FROM Attachments) , ...
0
votes
1answer
76 views

Email attachment coming through as .bin

I am working on a class with an invocable method to send an email with pdf attachment. Currently I am able to send the email correctly, however the attachment comes through as a .bin in outlook365 or ...
0
votes
1answer
25 views

File upload via related list not working in IE11

at the moment I'm facing a really weird issue: I have a custom VF page, that embeds <apex:relatedList list="CombinedAttachments"/> and also a custom VF component. The uploading of files ...
3
votes
1answer
418 views

Issue while uploading file greater than 5MB

I am trying to upload a file in salesforce and send it to Sharepoint for storage using synchronous call. However, when i upload file more than 5MB i am encountering an issue like below :' {FAILURE=...
2
votes
2answers
213 views

ContentNote not inserting

I am trying to insert a new ContentNote and link it to an opportunity with ContentDocumentLink. However, after inserting the content note, the ID returns as NULL, so referencing it in the ...
0
votes
0answers
26 views

Related List Files vs Notes & Attachments [duplicate]

users want me to add a related list to a custom object to allow you to add attachments. What is the difference between the "Files" and "Notes & Attachments" related list?
0
votes
1answer
216 views

System.DmlException: Insert failed. first error: REQUIRED_FIELD_MISSING, Required fields are missing: [File Name, Body]: [File Name, Body]

page: <apex:page StandardController="TicketIntakeform__c" extensions="forAttachmentsCls"> <apex:form> <br/><br/> <apex:panelGrid columns="1" style="display: ...
1
vote
1answer
126 views

System.DmlException: Insert failed. First exception on row 0; first error: REQUIRED_FIELD_MISSING, Required fields are missing: [Parent]: [Parent]

forAttachmentsCls class public class forAttachmentsCls{ public Attachment file{set;get;} public forAttachmentsCls(){ file = new Attachment(); } ...
0
votes
1answer
112 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
42 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
1answer
412 views

Uploading files to SFDC attachment object using REST call

I have requirement to upload files to SFDC attachments object. I am making REST call from my Java code to SFDC with required details. curl -X POST \ https://ap.salesforce.com/services/data/v29.0/...
4
votes
1answer
33 views

Getting ContentType for ContentDocuments?

The ContentDocument and the ContentDocumentVersion do not store a ContentType (MIME) like attachments did. I am trying to pass documents using an API and this information is needed to properly pass ...
0
votes
1answer
29 views

How to Export attachments with parentType.field = 'ABC'?

In my org i have a lot attachments available (55,000) and i need to export only those attachments which has Account.field__c = 'ABC' (10,000). I am not sure this is possible in SOQL or not as i tried ...
1
vote
1answer
34 views

Encrypted data not getting inserted in attachment body

I'm encrypting LiveChat Transcript body using integration with Skyhigh and storing it in the record. After that I'm trying to insert this as an attachment. Problem: Body is getting stored as in ...
1
vote
0answers
26 views

Enabling Notes and Attachment Access in Communities for Scratch Orgs

We create a scratch org with community enabled on it. There is a setting on the community (accessible through Setup > Communities > Communities Settings) where we have to manually check the ...
0
votes
0answers
100 views

remote invocation failed due to status code error when trying to insert attachment

I am trying to insert attachment using the ajax toolkit but it will always run into the onfailure method and will always return remote invocation failed due to status code error ,the same code was ...
1
vote
1answer
691 views

Display the list of attachments in a lightning component - download attachment

I need to display th elist of the attachment of a case in a lightning component. Here is the lightning component : <aura:attribute name="recordId" type="Id" required="true"/> <aura:...
3
votes
2answers
288 views

Rename Attachment Name

I want to replace the attachment Name (File Name) with the ParentName. So can I replace the attachment name? I have written the trigger on attachment an object. But Trigger is not working because of ...
1
vote
1answer
35 views

Case attachment not found via SOQL when added in community

In a community (napili) there is a button (global action on case) that allow users to create a new case and add an attachment to this case. When I do that, it creates me a case, and an attachment to ...
0
votes
1answer
22 views

Adding Retrievable Files to Custom Object?

I have a custom object called "Research" that has a "Notes and Attachments" section where users are to upload documents that represent research for that record. For other objects in our system, this ...
1
vote
1answer
227 views

Attachment uploaded using base64 encode is throwing an error

I am trying to upload a pdf file from anonymous block using the following code public static Id saveTheFile(Id parentId, String fileName, String base64Data, String contentType) { base64Data = ...
2
votes
0answers
191 views

Conga Composer Attachment creation Lightning Component

I'm trying to generate a PDF attachment using conga composer and attach it to my custom object. Find below the apex code used to construct the URL : Map<String, String> parameters = new Map&...
0
votes
1answer
408 views

How to save Renderas='pdf' in files folder

Is it possible to save a visualforce page with renderas='pdf' to the files folder so I can attacht the files to an email in lightning? Something like files f = new files( FolderId = UserInfo....
0
votes
1answer
53 views

Why am I not getting coverage for my attacmentclass

I have a extension class to attach a PDF to a record. I made Unittest which status gives succes but my code still has no coverage, why is this? Class: public with sharing class attachPDF { private ...
0
votes
1answer
61 views

Any Reason why someone can open PDF Attachment in Classic, but cannot open the same attachment in Lightning?

There is a PDF attachment on a custom object, this is opening fine in Classic​ but in Lightning​ it throws Insufficient Privileges error (in a classic window) as below when user tries to view it. ...