Questions tagged [attachment]

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

Filter by
Sorted by
Tagged with
1
vote
1answer
585 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
174 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'...
1
vote
1answer
2k 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
145 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
38 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
97 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
80 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
209 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
3k 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
935 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
139 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
34 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
505 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
467 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&...
1
vote
1answer
2k 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
61 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
245 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. ...
0
votes
1answer
210 views

Download attachments from associated records - Community

I have a community where users can raise cases, attach logs, etc. A user can be a customer or a partner - where partner doesn't always have partner community license (users with customer community ...
11
votes
1answer
17k views

How to retrieve the file content for a ContentDocument object?

Previously, on Salesforce Classic, when a file was uploaded, it was saved on the Attachment object table. This object had the Body field. On Lightning Experience, however, attachments are stored as ...
0
votes
1answer
207 views

How to lock the pdf document In salesforce?

I am sending an email with PDF Attachment through a workflow. The user should not able to Edit the document which he received by email. He should open and download and review but should not Edit the ...
0
votes
1answer
240 views

Prevent attaching to Notes & Attachments while adding to Quote PDFs

I have a trigger that will save the Quote as PDF in Quote PDFs section (QuoteDocument object) whenever the status is updated to Accepted. The problem is, it also attaches to Notes & Attachments ...
2
votes
1answer
372 views

Attachment not visible in visualForce page Salesforce

Trying to display an image from attachment in Salesforce, on the First-time loading the image is not displayed but a blank image thumbnail is displayed when on inspect could find the Link with ID- if ...
0
votes
1answer
164 views

How to copy attachments sent with an email from child case to master case

I am developing a functionality where I need to copy emails(emails+attachments) from a child case to parent case on merging. Right now what ever I have developed I achieved copying emails from child ...
1
vote
0answers
33 views

Add A Visual Image Into a VF E-Mail template from the “Notes & Attachments” related list of a managed package object

This is the code I have written thus far: <messaging:emailTemplate subject="Your Offering Listing" recipientType="Contact" relatedToType="vlocity_ps__InventoryItem__c"> <messaging:...
0
votes
1answer
316 views

Error: Invalid child of messaging:emailTemplate. Only messaging components are allowed as children of messaging:emailTemplate

I'm trying to understand the VisualForce code below to see what was written & is causing the error above: <messaging:emailTemplate subject="Your Offering Listing" recipientType="Contact" ...
0
votes
1answer
299 views

Notes and Attachments, conversion to Files SOQL

I converted all Notes and Attachments which are associated to Case object to Files. When I run a SOQL query on ContentVersion to see all the Files, I don't see all the files. Case has Public Read/...
1
vote
1answer
1k views

Why are my emails with .pdf attachments and sent via SF are converted to .html files?

Why my emails with attachments are converted from PDF to HTML? The email I've sent had only 1 attachments 1MB so why it is converted from PDF to HTML? Any suggestions please?
-4
votes
1answer
911 views

create formula for download Attachment and File [closed]

I have a id of Attachmant OR File is stored in a variable now want to write formula to download attachment or File is it possible ?
-5
votes
2answers
349 views

How to remove notes and attachment from account object?

Is there a way to remove the notes and attachment related list from account object so it won't show in the related list section of accounts?
0
votes
1answer
785 views

Accessing “Include attachments” from the Lightning for Outlook plugin

I do have a custom Lightning component on my Lightning for Outlook interface. This has a basic input form which just creates a new record on the Salesforce. Whenever an email with an attachment(s) ...
1
vote
1answer
617 views

Create a pdf attachment when you are a guest user

Good day Everyone. I am trying to create a functionality that will create a pdf and make it as an attachment. It is working fine when you are an authenticated user however when I try to create a ...
0
votes
1answer
1k views

Show Notes & Attachments on Custom Object in Lightning

Does anyone know how to show Notes & Attachments associated with a custom object in Lightning? I have an Insurance Claim object. I have created a custom page in Setup > Lightning App Builder > ...
1
vote
0answers
59 views

Console Attach File - Done button closes tab instead of returning to parent

In the Console, if I attach a File to a Case, the Done button does not return you to that Case. I realized the URL does not have the retURL set like it does in a classic, internal app view. So I ...
0
votes
0answers
620 views

Insert Attachments by content type via Apex

Currently when we insert an attachment via Apex code it automatically converts in to attachment type regardless of the file type. For example when we insert a Jpg file, it converts to plain attachment....
0
votes
1answer
41 views

Email with an attachment from Salesforce

When I create an email in Salesforce & add an attachment, I receive a popup warning message indicating that the attachment becomes public if I click the send button. I don't understand what this ...
1
vote
1answer
3k views

Create PDF from the created record and save it as attachment

Good day everyone. I am trying to create a pdf from a newly created record. I search in the internet and I find this link : https://jungleeforce.wordpress.com/2014/06/11/generate-a-pdf-and-attach-it-...
1
vote
1answer
8k views

Difference between Attachments and ContentDocument [closed]

I am trying to be able to download a file blob attached to a Case. I was first looking on the attachments table for the id of the file and realized it wasn't there and it was in ContentDocument. The ...
3
votes
0answers
165 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
2answers
71 views

Data Dump of Attachments

I am trying to do an export of approx 30,000 attachments in our Salesforce Org, Would anyone have been through a similar exercise and can advise best practice or the best way / tool to do this? Kind ...
0
votes
1answer
81 views

How to attach a document to Contract that has fields auto populated and formatting saved

I am trying to automatically attach a document to the Contract Object when I create the object, but with fields auto populated (think DocuSign). I've tried a few things in Apex, but keep running into ...
1
vote
1answer
684 views

How to attach pdf file represented as bytes(response from SOAP API) to an Opportunity?

I have e response from a SOAP API which looks like the following <GetReportResult> <Xml> <report xmlns=""/> </Xml> <Html/> <...
1
vote
0answers
734 views

How to get parent custom field from attachment [duplicate]

I am able to get standard field of parent object in attachment: SELECT Id, Parent.Name, CreatedBy.Name FROM Attachment But how to get custom field from parent attachment, something like: SELECT Id, ...
-1
votes
1answer
400 views

Email Attachment (customizing standard button on Case object)

I am trying to Revise "Send An Email" button on Cases,When the Agent hits "Send An Email" button,any attachments associated to the case should get listed in the Attachment sections and agents get the ...
0
votes
1answer
18 views

Delete attachments ramification

We have 1.6 gig of attachments. If the client doesn't need the anymore and I just remove them via dataloader from the attachment object, does it break any standard SF functionality? Anything one needs ...
1
vote
1answer
2k views

How to convert C# byte array of a file content to upload in SF Attachment

I'm calling an external C# API which return me a file, that file I need to attach under Attachment. I tried some ways but not able to get the right approach, below is the sample response from the API. ...
1
vote
2answers
303 views

Verifying required number of attachments before allowing approval - Two ideas not sure which to use

I have two different business units that are wanting ways to verify that an object as well as certain related (not necessarily master-detail) objects have a specific number of attachments before ...
0
votes
0answers
527 views

Convert legacy attachments into the files

I need help to convert legacy attachments to files with lastmodifieddate of file is equal to created date of attachments by using apex code. I need to do it for all objects on which attachments are ...
1
vote
1answer
2k views

Insufficient privileges when uploading attachment to record

User keeps getting an error of insufficient privileges when trying to upload a file as an attachment to the Product standard record. How can I grant access to upload the attachment?
0
votes
1answer
60 views

Expose all image attachments for custom object

I have a custom object that has "Group Events." These are events our org runs that have one or more partner accounts (i.e. someone who hosted the event or helped pay for the event space), featured ...
1
vote
1answer
2k views

How to create a File (a la Lightning) and link it to a Case via REST API?

In the Lightning UI if you attach a file to a Case it won't be created as an Attachment, rather as a File. I could not find anything about this in the REST API docs. What I found just by try and ...

1 2 3
4
5
13