Questions tagged [attachment]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
13 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
1answer
18 views

Download Attachment using php is not working for xlsm files

I'm using the below php code to save the Attachment to my server. public function getAttachmentFileFromSalesForce($fileName, $fileBodyUrl) { try { $authCode=''; $...
0
votes
1answer
31 views

Restrict users to open Notes & Attachments [closed]

We have Account object which is common for all the users and they can see all the attachments for this object. Is there any way to restrict users to open Notes & Attachments? Only Account Owner ...
0
votes
0answers
14 views

Unable to convert lead after applying custom validation rule via code

There is a requirement that if we have an attachment then and then only we can check a checkbox (i.e. isCreditCheckDone) and after then only we can convert lead into respective account and opportunity....
0
votes
1answer
19 views

Bulk Upload Attachments into Lightning Knowledge Articles

I would like to bulk upload list of pdfs as attachments against knowledge articles. I think the documents are getting stored in ContentDocument, but how can I use dataloader to load attachments and ...
0
votes
1answer
13 views

How to fire a process builder after a document is added to an oppty/object

I have a case, where upon adding a file/attachment to an opportunity, I need to send that attachment, as an email. I don't want to use the trigger: trigger trialFileUpload on ContentDocument (after ...
0
votes
0answers
20 views

User cannot see attachments for one record but can see for other records on the same object

One user can see the attachments for 1 record but cannot see the attachments for another record for same object. Scenario: User : U Object : A Record 1: User U can see the attachments Record 2: User ...
0
votes
0answers
21 views

Find Accounts without Attachments

In a CSv file I have a list of AccountId's. I am trying to determine the best way to find if these Accounts have an Attachment. One Approach that come to mind is this - Write an Apex script to ...
0
votes
0answers
15 views

Sharing files externaly not working as expected

As severe topics advise, I am using contentdistribution to generate DistributionPublicUrl to share Files as images externaly. The problem is that the url generated have like a bar with the name of ...
1
vote
1answer
33 views

How To Merge Concatenate Two PDF Files In Salesforce [closed]

I was wondering if there's a possibility to meet this requirement using any PDF tool (maybe Conga) in a Salesforce Org. I'm making a LWC that must merge or conc a group of PDF files related with a ...
0
votes
0answers
22 views

Not able to view the case attachment(PDF) from Lightning component

I am facing one issue related Case attachments(PDF).Actually not able to find what is the problem. Description:- We have one standalone application, one custom object(like Case) where we are saving ...
1
vote
0answers
23 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
20 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 ...
0
votes
0answers
28 views

How to upload image to Salesforce from a native iOS app built using Salesforce Mobile SDK?

I want to upload an image to Salesforce database from my native iOS app built using Salesforce mobile sdk. I heard we should be making use of ContentDocument, ContentVersion & ContentDocumentLink ...
0
votes
1answer
37 views

Viewing attachments renders rubbish

We attached a number of PDFs to various Accounts under 'Notes and Attachments'. Some users when they click on the attachment a new window pops up and they see gibberish on the screen like. The browser ...
0
votes
0answers
14 views

Changed ContentDocument Owner via Dataloader, but is not being reflected in File List

I was asked to change the file's Owner, I did it via Dataloader app, the issue is that it still showing the old user as Owner. But the actual owner of the file is correct. I even deleted the sharing ...
0
votes
0answers
29 views

Error 'Java Heap Space' in Data Loader

With Data Loader (Version 44.0.0),I am trying to insert Attachments in Salesforce. There are 12k PDF files. Each file is around 190 kb. So total attachment are 2.28 GB This is the structure of my ...
0
votes
1answer
18 views

Delete all attachments at a time on a Particular Opportunity Record

I have to delete all attachments related to a particular Opportunity Record based on Id or Name. Currently, I am deleting them manually one by one. Is there any workaround to delete all attachments ...
0
votes
1answer
37 views

Importing 40k PDF as attchments

I have 40k PDF's in windows shared drive. Each pdf should be attached to parent account. The name of each pdf is an external ID in salesforce. e.g AA123.pdf corresponds to AccountRecordId '...
2
votes
1answer
65 views

How to merge record data and a pdf attachment and generate a single pdf in apex?

I have one pdf file as an attachment of record. I want to create a single pdf file that contains some data from the record as the first page and the attached pdf file as the next page. How I can ...
1
vote
1answer
61 views

Didn't understand relationship 'Attachment' in FROM part of query call

I am trying to get all Accounts that has attachmentss. These accounts are of a particular record type, and has a certain value in Manufacture__c field This is what i tried list<Account> acc = [...
1
vote
0answers
33 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
35 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
63 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
27 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
33 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
225 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
18 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
113 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
56 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
25 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
37 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
111 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
18 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
61 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
34 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
33 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
26 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
23 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
27 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
19 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
53 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
61 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
28 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
0answers
74 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
54 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
35 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
30 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 ...

1
2 3 4 5
13