Questions tagged [attachment]

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

194 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
16
votes
3answers
967 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 "...
5
votes
0answers
307 views

Attachments auto download in Spring 16? Workarounds?

A client has an existing integration that runs daily, which calls a 3rd-party system to generate a report on new opportunities; the generated report is added to the Oppty as an Attachment, as an HTML ...
5
votes
1answer
134 views

Is there a way to show attachment logo in activity history?

in Salesforce there will have an attachment logo in emails like this: is there a way i can display attachment logo for activity history as well?
3
votes
0answers
649 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&...
3
votes
0answers
190 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....
3
votes
0answers
4k views

Using Lightning input file

I've been using the lightning:input type="file" <lightning:input type="file" label="Attachment" name="file" multiple="true" accept=".docx, .doc, .xlsx, .zip" onchange="{! c.handleFilesChange }"/&...
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 ...
3
votes
0answers
1k views

Let community user download attachments linked to his contact

During enrollment process our community user signs some documents/agreements which are saved as attachments on contact object (community contact representing the current user). And now on community ...
3
votes
0answers
654 views

The user keep geting invalid session when trying to upload files

We enabled option on Salesforce Files Setting: Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments . After that, user keep getting ...
3
votes
0answers
268 views

Summer '14 CombinedAttachment.ContentUrl returns null

I'm using a StandardController page like the following to try and display the URL of a Google Doc. To test this, I've uploaded a real Google Doc to an Account record, and I can see the 098 record ...
2
votes
0answers
39 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 ...
2
votes
0answers
424 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. ...
2
votes
1answer
234 views

Prevent attachment of Certain type while sending email

I have been trying to prevent an attachment of type pdf while sending emails within Cases. I create an email, attach a pdf document. The process builder fires on Email creation which in turn calls a ...
2
votes
0answers
438 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 ...
2
votes
2answers
800 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 ...
2
votes
1answer
331 views

Download all files on an Opportunity

Just a little background on my situation, I'm a new Admin/Developer for Salesforce, my company recently started using Salesforce and I'm trying to fulfill all the needs as they come. I have NOT had ...
2
votes
0answers
212 views

Limited speed of downloading from Attachment endpoint

For an Attachment sobject, there is a 'Body' field, whose value looks like: /services/data/v39.0/sobjects/Attachment/00Q5700000v3mCFREE/Body. When I make a GET request to this endpoint using Python ...
2
votes
0answers
68 views

Lightning Component that requires attachemnts

We have a communities page (displayed below) that has a Create Case From for the community user to create cases based on picklist values that are dependent on each other. The Request Type picklist ...
2
votes
0answers
466 views

How to Purge Case Attachments?

We have a support Community where customers can create Cases and attach files to said cases for our support people to follow up on. I am trying to write an Apex batch job that purges the file ...
2
votes
0answers
516 views

Attachment limitation for REST API

We are working on doing a Sharepoint integration with Salesforce and a part of this service requires Sharepoint to fetch all attachments including body after a particular date. We were working on ...
2
votes
1answer
392 views

How can i use Files Connect to upload an attachment with apex, to Google Drive?

I'm new to this salesforce world and i recently discovered i can synchronize my salesforce instance with a Google Drive. I already have a connection established using Files Connect to my Google Drive, ...
2
votes
0answers
243 views

Hiding activity and attachments for a profile

I want to hide notes and attachments, Activity of Account and Contact object for a specific profile. Ie., that profile can view all the accounts and contacts but they cant able to see the attachments ...
2
votes
0answers
39 views

Unable to delete a 21 Mb attachment

I created a 21 Mb attachment to test some code I was writing. Later I saw that my DE org ran out of file storage and it wont let me save any new records (even when the data storage is 40%). I deleted ...
2
votes
0answers
90 views

Chunking SObject in SOAP API

I am running a backup on Attachments object using the query: SELECT Id, IsDeleted, ParentId, Name, IsPrivate, ContentType, BodyLength, OwnerId, CreatedDate, CreatedById, LastModifiedDate, ...
2
votes
1answer
560 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="...
2
votes
0answers
84 views

Centralize Object Initialization - (Insert Event with Attachment on same code)

I have a piece of code that sets a Boolean (has_Attachment__c) field to true in an After Insert context variable is executed in an Event in which an Attachment is inserted on the same time. The code ...
2
votes
0answers
308 views

Customizing the article attachment in the send an email functionality

As per standard salesforce functionality, while using Send an Email from a case, you have the option to attach the article as an attachment to the email that is sent. Salesforce has a certain ...
2
votes
0answers
504 views

Notes and Attachments on Contacts in Customer Community

I don't see Notes and Attachments related list on Contacts. From page 24 Communities Implementation guide it says Customer Users don't see Notes and Attachments related list on accounts or contacts ...
2
votes
0answers
342 views

How to expose a Note on a Visualforce Page in Force.com Site

I'm trying to display all the collateral on a record. I'm using the CombinedAttachments relationship in the way below. It works great for Attachment if the user has access to the record. <apex:...
2
votes
0answers
483 views

How can we re-size the attachmant file in salesforce

I am working on salesforce1 app where I have a apex:inputfile tag, on which I have added attribute capture, for capture image using mobile camera (capture=camera). This is working fine with both ...
2
votes
1answer
1k views

regex too complicated error when using split function for less than 1M characters

I am working with an attachment in Salesforce. this is a text file with 7291 rows and each row has 94 columns. I am able to read this attachment record as "Attachment". I am also able to convert "...
1
vote
0answers
24 views

When I open a Salesforce Attachment it is downloaded but the pdf is empty

I am getting the attachment body using the Rest API. var config = { method: 'get', url: '<Domanin>/services/data/v48.0/sobjects/Attachment/00PD000000HQD68MAH/Body'...
1
vote
1answer
388 views

What data type can be used to support file uploads in Salesforce?

I have a custom object and I want to add a new field to support file attachments. For example, while creating new record, I want the user/admin to have an option to attach files to that record during ...
1
vote
0answers
89 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 ...
1
vote
0answers
94 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....
1
vote
0answers
47 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
0answers
130 views

Attachment as PDF is blank

I'm trying to save an attachment as PDF inside a record. The process happens after insert trigger - when I send the data to a function to generate a pdf as an attachment and saving it in the record. ...
1
vote
0answers
24 views

CSV attachment, replacing \n from cell values

I am trying to create a csv attachment through apex, I am getting the csv with the values. But some values for eg. 'Hi I am xyz.\n This is an example code.' are getting split to next cell because of ...
1
vote
2answers
634 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 ...
1
vote
0answers
47 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 ...
1
vote
0answers
44 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 ...
1
vote
0answers
204 views

How can I prevent unauthenticated users from downloading an attachment?

I have a community and internal links to attachments. They end with ...servlet/servlet.FileDownload?file={ID} When the user clicks the link, a window.open(fileUrl) is called. This prompts to download....
1
vote
0answers
47 views

Locking Attachment During Approval Process is failing

I am trying to lock the Attachments related to a custom object using the below 2 lines of code, when the custom record is under approval process. But I am getting an error as: "System....
1
vote
1answer
492 views

Lightning Component - Draw attachment image on HTML Canvas

I have a custom object that has an attached (png) image to it. I'm trying to create a lightning component that pulls the attachment and draws it on a html canvas. So far in the below code, I'm able ...
1
vote
0answers
661 views

How to add generated attachment public link to "Public link Sharing" modal in lightning

I have a Custom Object with Attachments enabled. When a user uploads a file I'd like to automatically create the Public Link for the attachment. To generate public link I use the code below. ...
1
vote
1answer
351 views

Inserting Document Links in Marketing Cloud

According to this article: Insert Document Links, one should be able to insert a link to a stored file. The icon in the article appears to be a copy/paste icon (not sure if that matters) but I can't ...
1
vote
1answer
42 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) , ...
1
vote
0answers
121 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 ...
1
vote
0answers
36 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:...
1
vote
0answers
67 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 ...