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
0answers
49 views

Conga Composer: set default parameters on layout of tool [closed]

My question can be trivial but I'm struggling with following problem: when I open Conga Composer tool, I have few options to choose: My goal is to set "Enable" as default to Save a Copy in Notes &...
1
vote
1answer
37 views

How to Prevent inserting attachment for a custom object based on Parent record condition? [closed]

I need to Prevent inserting attachment if parent record's status is "Closed". I have tried with before insert where i couldn't get parentid so it is not working. Any directions/suggestions will ...
1
vote
1answer
154 views

Is there any way to Prevent Upload a file in notes & attachment for a custom object?

I need to prevent uploading file in Notes & Attachments when parent record's status is set to some value. ex: If parent record's status values is Submitted then user should not be able to upload ...
2
votes
2answers
36 views

Copy Attachment to File Issue

On lightning, I changed the File Settings and checked on this feature: “Files uploaded to the Attachments related list on records are uploaded as Salesforce Files, not as attachments” In my code, ...
0
votes
1answer
31 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
44 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
430 views

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 ...
0
votes
0answers
20 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 ...
1
vote
2answers
207 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
185 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
30 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
58 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 ...
1
vote
1answer
425 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
0answers
19 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
334 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
0answers
49 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
36 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
0answers
29 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
25 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
0answers
68 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
22 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
67 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 ...
0
votes
1answer
68 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 ...
0
votes
1answer
42 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 ...
0
votes
1answer
114 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,...
1
vote
0answers
21 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 ...
0
votes
1answer
58 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 ...
0
votes
1answer
37 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 ...
0
votes
1answer
45 views

Is it possible to move Files under Activities to Opportunities/Accounts

As Salesforce Files of Archived Activities are not displaying in Lightning, our Sales manager is asked to try an option. That is to move the Files attached to Task/Events to its associated Opportunity ...
2
votes
1answer
51 views

How do I find out which Account is associated with a specific ContentDocument?

When the user attaches a file to an account, this triggers the ContentDocument trigger. What logic should I put in the ContentDocument trigger to have it find the associated account?
2
votes
1answer
49 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
78 views

attachment pdf loop not working

I have a problem with a oncomplete button. The goal is to do a loop throughout all my custom object and to generate a pdf and attach it to my custom object. I manage with the following loop to attach ...
0
votes
0answers
22 views

id vf page attachment not working

I have 2 vf pages (one is a clone of the other one without the action) The first one called S : <apex:page action="{!saveAttachement}" standardcontroller="aktarus__C" extensions="Audit" ...
0
votes
0answers
61 views

insert attachment getcontentaspdf not loading data dynamically

I have a method that call a vf page and render as pdf the following Pagereference test = new Pagereference ('/apex/claire'); return test; that gives me the page I am expecting after that the ...
0
votes
1answer
38 views

Attachment trigger work not persisting

i am trying to append the case id to attachment using trigger i have written correct logic but not getting any error and not appending case id to the attachment here is my code Trigger: trigger ...
2
votes
0answers
229 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
1answer
148 views

How to extract attachments data in Lightning Experience?

I'm currently using the Document object/table in SOQL to extract attachments in Salesforce classic. As far as I'm aware in Lightning it is necessary to use File instead of Document object to extract ...
1
vote
3answers
92 views

How to tell the object type of an Attachment

I need to export all of the attachments of an org. I would like to break them down to be in a folder based upon the object type of their parent. In other words, I want all attachments which are in an ...
1
vote
1answer
70 views

How to store huge text in Salesforce record

I want to store the content of a small book in a Salesforce record. I want to make the text to be searchable by the Standard Salesforce UI and via Apex and SOSL and display it in Lightning UI. I know ...
2
votes
1answer
63 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 ...
0
votes
1answer
52 views

Batch callout: How to upload Attachments from multiple objects (dynamically)?

I am trying to upload an Atttachments based on the selection and criteria from Lightning Component that will be saved to Custom Setting. For example, the criteria is Opportunity - Stage - Closed Won, ...
2
votes
2answers
110 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 ...
1
vote
1answer
770 views

Trigger on content document to retrieve the body

I believe this question is a possible continuation of this other question: How to retrieve the file content for a ContentDocument object? I am trying to get the body of a JSON file that is uploaded ...
6
votes
1answer
112 views

Does sending a file to an external server fall under the heap size limit considerations?

I have to send SFDC files to a third party application, via custom apex. My only concern is, if my file size is 40 MB, will it fail due to the heap size limit? If yes, what is the workaround?
0
votes
0answers
71 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....
0
votes
1answer
316 views

Attachments in FeedItem After Insert Trigger

I'm trying to get the attachments from a FeedItem after insert trigger, but it does not return all the associated attachments. I understand attachments are inserted after the FeedItem is inserted (ref....
1
vote
1answer
251 views

How to generate an external downloadlink for files

I have created a visualforce page (site) with a dowloadlink from files. I can use this when I am logged in into Salesforce. I want to achieve this for external users by a site. In salesforce It is ...
1
vote
0answers
40 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
275 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
275 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
2
3 4 5
13