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
115 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
54 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
572 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
83 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
32 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 ...
1
vote
1answer
926 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 ...
1
vote
2answers
506 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
1answer
774 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
35 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
108 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
1k 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"> <...
2
votes
1answer
427 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
99 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
154 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,...
1
vote
0answers
38 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
233 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
1answer
148 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
118 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
148 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
216 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
33 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
73 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
234 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
97 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
94 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
53 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
107 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
107 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
45 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
372 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
281 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
228 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
126 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
178 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
94 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
286 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
1k 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
119 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?
1
vote
0answers
168 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
579 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
660 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
44 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
418 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
548 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. ...
0
votes
0answers
277 views

How to translate the “Choose File” button and the “No File chosen” labels in the “Attach File” page

I am trying to translate the standard "Attach File" page. This is the page that is opened when you click on the "Attach File" button in every object attachment list: I have succeeded on everything ...
2
votes
1answer
898 views

Is there a way to hide Files from 'Files & Attachments' related list?

I think this is impossible but is there any way to hide Files in Notes & Attachments relatedlist of classic view? We moved only Admins to Lightning and wanted to roll out to other users slowly. ...
1
vote
1answer
149 views

Hide attachment record without code

Can someone please confirm if is there any way to hide sepecific records from notes and attachments records related to contacts, for example, I have 3 related attachments on contact object but I want ...
0
votes
1answer
84 views

ASP.net calling Salesforce webservice to upload attachment

i have a website created using ASP.net and i would like to allow people to upload files from the website and i want those files is then store in Salesforce. I am not good in webservice but i think ...
0
votes
0answers
367 views

Can we give user permission to add Notes & Attachments even user's profile has Read only for that object

I have a below setting for the object. ORG wide defaults- Private User's Profile - Read, View All Can I have user to add notes and attachments despite the fact he can't edit object. Thanks
0
votes
1answer
208 views

Can the owner of an attached file be set to a queue?

My app's users need to be able to view and edit each other's files that they have attached to records. So my idea was to put my users into a Queue and then set the owner to that Queue on upload. I ...

1 2
3
4 5
14