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
1answer
48 views

Unable to upload large files (not above 4MB) as attachment with apex class method from LWC. How to overcome this issue?

LWC method to convert selected file content to base64 String and call the apex method for uploading as related Notes and Attachment on a particular record myComponent.js const toBase64 = file => ...
0
votes
0answers
20 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 ...
0
votes
1answer
17 views

Can't get attachment data from outbound email via Apex

Has anybody got experience or ideas how I can resolve the following issue please? We're trying to query attachments sent via outbound email from the email related list on case, so that we can copy the ...
0
votes
1answer
36 views

How to get base64 from Body__s field on Salesforce Classic Knowledge

I am trying to get the base64 encoded version of a Salesforce Classive File Upload field type via the Salesforce REST API from one org to another. However when I query the rest API for the knowledge ...
0
votes
1answer
27 views

Where can I view attachments that I've uploaded to salesforce using a REST api?

response = requests.post('https://%s.salesforce.com/services/data/v29.0/sobjects/Attachment/' % instance, headers = { 'Content-Type': 'application/json', 'Authorization': 'Bearer %s' % sessionId },...
0
votes
0answers
17 views

View attachment button tries downloading file instead previewing it onsite

When "VIEW" button is pressed on attachment record files of type ( .doc, .docx , .msg ) etc gets downloaded instead opening automatically without downloading. This was how it was working ...
0
votes
1answer
32 views

Parent ID not updating on Attachment [closed]

I have a requirment where when 2 records are merged, the attachment related to merged record should be inserted to parent/master record. Below is my code related to this List<Attachment> attObj =...
0
votes
0answers
28 views

Read visualforce as pdf in the attachment and display it in record page (attachment is blank)

I'm creating a visuaforce page as pdf to display some account and opportunity fields in pdf. But when I try to read the pdf and add it into attachement I find that is blank. Please could you help me ...
0
votes
1answer
25 views

Blank PDF attachment when try from site

I have a site, when a guest user insert some data into a inputText it triggers a record creation (HojaEntrega__c object and child records from HojaEntregaItem__c object), then an attachment creation ...
0
votes
1answer
18 views

Identifying attachment type

I am attempting to identify the format of attachments which come in emails entering my Email Service in order to determine if an attachment is a .csv file. I was guided to use this as my solution : ...
0
votes
0answers
25 views

Fetch Document Blob value from files

I am trying to create an Apex REST API to get documents from "Files". I want to get the document as a binary/blob value. I used the Rest Explorer in Workbench and could figure out the query as: /...
0
votes
1answer
57 views

Prevent file from being duplicated as email attachment - Apex

I've button when i click on it it generates new file , i want to attach that file to email The problem i'm facing is that i found duplicate attachments when i click on button twice , 3 attached file ...
1
vote
2answers
34 views

Same Image Preview getting displayed for all attachments

I am trying to display respective attachment preview on a VF Page, but if you can see below picture of my VF page, same image is getting displayed for all attachments, not sure where i'm going wrong ...
0
votes
2answers
60 views

How do I get correct base64 data present in VersionData field in ContentVersion through jsforce?

I am using jsforce to query VersionData field in ContentVersion object. However, it returns me the URL to the base64 data instead of the actual data. If I make a GET request to the URL (using the ...
0
votes
0answers
43 views

Attachfile Ampscript function not working

My goal is to add an attachment to my email via ampscript. That's why I was looking at this guide and used this code: var @fileName, @fileAlias set @fileName = "testAttach.doc" set @fileAlias = "...
1
vote
0answers
31 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....
0
votes
2answers
17 views

Error posting request to add attachment via chatter rest api. version 30.0: “Unrecognized field attachment”

I am trying to post an attachment into the chatter feed of a bug item in GUS. Working with api version 30.0, and using the api reference for this version at: https://developer.salesforce.com/docs/...
0
votes
1answer
41 views

How to share an attachment using url?

I am new to saleforce and I used the following code to save files to the Attachment object in salesfore: String base64Data = EncodingUtil.urlDecode(base64Data, 'UTF-8'); Attachment attach = new ...
0
votes
0answers
5 views

Salesforce to Salesforce How to send Email History and attachments and Libraries from Source org to destination org

I have enabled salesforce to salesforce, and able to send the record from one org to other org, but the attachments and email messages related to record are not getting shared which are stored in ...
0
votes
0answers
28 views

Even after having the value in .csv file last column , apex is taking it as null and not able to insert that last column field in object

CsvAttach__c csv=new CsvAttach__c(); String[] fieldsData=readArray[1].split(‘,’); For(Integer j=0;j<2 ;j++){ if(String.isNotEmpty(fieldsData[j] && field[j]==‘Subject’){ csv.put(Schema....
0
votes
0answers
24 views

Is it possible to pull all Salesforce Ids as a CSV

When migrating certain Objects like attachments, there are parentid relationships that may be related to different objects/records ids. https://developer.salesforce.com/docs/atlas.en-us.api.meta/api/...
1
vote
2answers
20 views

REST API call to fetch attachment from salesforce is showing Binary response. How can i covert this Binary response to the Original file?

I am trying to extract a file from Salesforce through REST API call. I am getting the Respone in Binary File. How can i covert this Binary response to the Original file?
0
votes
1answer
32 views

How to add 2 attachments to a record created trough a force.com site without surpassing viewstate limit

I am working on a force.com site visualforce page where I create a record and want to add 2 required attachments in the same visualforce page. When I add the first attachment I reach the viewstate ...
0
votes
1answer
53 views

How to attach contentversion to record in Javascript

I am working on a solution to avoid to surpass the viewstate limit when uploading a file. Currently with javascript I create a record and create a contentversion but the contentversion is not attached ...
0
votes
1answer
68 views

How to advoid Maximum view state size limit (170KB) exceeded. Actual view state size for this page was 292.001KB

I currently have an apex class which creates an object record and attaches 2 files. I added a loop to be able to have the option to add more attachments based on counter. I currently have some ...
0
votes
0answers
22 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
21 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
40 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
15 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
56 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
119 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
21 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
22 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
20 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
68 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
24 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
32 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
22 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
52 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
40 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
17 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
39 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
20 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
38 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
72 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
74 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
44 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
124 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
33 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, ...

1
2 3 4 5
13