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
2answers
2k views

Where are Knowledge Article attached files stored?

I've created custom field of "File" type with name "Attachment" and added image to one of Knowledge Articles(see screenshot). After that I've checked Attachment, ContentVersion, ContentDocument ...
1
vote
0answers
117 views

Map Attachment to EmailMessage Record

I have a kind of odd question. We just implemented Service Cloud for about 15 users, as well as email to case. Some of our users want to have the ability to upload existing /historical outlook ...
0
votes
1answer
631 views

Arithmetic expressions must use numeric arguments

The following class will get the content(a maximum of 10 MB) in encode format and I convert the content into decode format based on the my requirement into three parts. Now I want to add the all three ...
1
vote
1answer
88 views

How do i make adding attachments not required?

I have created an apex class where I can insert a new record and add an attachment. it works fine when i create a record that has an attachment. But when I don't add the attachment, it does not work. ...
1
vote
1answer
2k views

Apex method to retrieve the download link for a standard Attachment

I stumbled across an Apex method in the documentation recently that would generate a URL for the download link for a standard Attachment, with a name something like getDownloadLink(). I don't ...
0
votes
2answers
758 views

AJAX Toolkit logs error “NetworkError: A network error occurred.”

I'm using the Ajax Toolkit to upload files on a VF page, like described here. The Upload works fine, the file is available and not damaged. But the response is not coming back properly. <apex:...
0
votes
1answer
868 views

Accessing a pdf as content document via URL

I have a problem when accesing a pdf stored as salesforce file via URL. At some point in time I was able to load a pdf (stored as note and attachment) in my browser using the following link : [...
-2
votes
1answer
731 views

Initial expression is of incorrect type, expected: Messaging.EmailFileAttachment but was: Attachment

The below code gave me this error: Initial expression is of incorrect type, expected: Messaging.EmailFileAttachment but was: Attachment Specific error line: eMessage.setFileAttachments(new ...
1
vote
2answers
3k views

Display image from attachments in lightning component

I am trying to display images stored in attachment object for a particular contact using a lightning component but i am not able to do so i.e the page appears blank. Below is my code. ApexMethod : @...
1
vote
2answers
764 views

Notes and attachment in Winter'18 release

In winter'18 Notes & Attachments related list will no longer have an Upload File button. In my application, I am inserting the attachment using apex code. I just want to confirm if we can still ...
2
votes
1answer
588 views

Setting the Attachment Owner as another User

I have a custom object with OWD set to private. I've created a record and have set the record owner to a user in the system. Now I'm attempting to add an attachment to this object with the owner as ...
0
votes
1answer
131 views

Attach Printable View PDF as an attachment in Standard Object

I have a requirement of attaching the Printable View of a standard detail page to the Attachments of a salesforce object.I have written code in developer console but the PDF saved is not opening. ...
0
votes
1answer
830 views

New drag and drop lightning control in Attachments

I'm trying to figure out if this: https://releasenotes.docs.salesforce.com/en-us/summer17/release-notes/rn_files_related_list_drag.htm Is available as a lightning component to use in your own ...
0
votes
1answer
282 views

AJAX attachment upload, bad field ParentId

I have a project to upload some files for both licensed users and portal users. Got it working 98%... except for portal users.. mama mia... I created a site off a domain, logged in a user and ...
0
votes
0answers
30 views

checking if an attachment already exist given custom object

I am using python code with the SalesforceBulkpy API to upload an image to a custom object. I want to make sure I only upload the image once so I thought on adding a check if an image exists before ...
3
votes
0answers
3k 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 }"/&...
0
votes
1answer
234 views

File uploaded via File API is not readable when downloaded

I'm uploading a file via File API inserting into Attachment Object, on a visualforce page in javascript. When i query that body of the Attachment, the file is not readable. I tried decoding but my ...
0
votes
1answer
27 views

How do I change the default on opportunity Notes and Attachments to be NOT private?

opportunity notes and attachments are always set to private by default but Users wanted it be made public by default.
2
votes
1answer
1k views

Public Imageurl

We're looking for a way to upload a picture, either as Attachment, File or Content Delivery. We want to use that Image on an external website. We just need to get a public URL of the photo itself (no ...
0
votes
0answers
146 views

Attachment related list on custom vf page while creating task

I have created a vf page and have override the New Task button the problem is that on my vf page I am not getting the Attachment Related List as it is coming in standard page. Is there any tag for ...
0
votes
1answer
594 views

Getting all attachments for a record in a visualforce email template

When sending an Email via a Visualforce Email Template, I would like to get all attachments I have for an Opportunity record. I found this page very helpful: Insert Attachment into Visualforce Email ...
1
vote
0answers
692 views

Automatically enable Public Link on Attachment Upload

I have a Custom Object with Attachments enabled. When a user uploads a file I'd like to automatically enable Public Link Sharing and create the Public Link for the attachment. I'd also like to ...
2
votes
0answers
266 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 ...
7
votes
1answer
1k views

Visualforce: Why the display of an PDF-File inside an IFRAME works on a Sandbox but not in Production?

On a Visualforce page I have an IFRAME like this: <iframe class="viewer" src=""></iframe> It starts up an shows nothing because src is blank. Good. To store the actual PDF I upload it as ...
-2
votes
1answer
495 views

Require Image in Rich Text Field, and add it to the attachments field

I need to add an Attachment (image) to a custom record, and i would like this to happen on record creation. I was thinking of having a rich text field that is required on record creation, where a user ...
0
votes
2answers
9k views

Save base64 data as Attachment

This has been bugging me for a while. I think I am missing something very obvious. So from a REST api I am getting a base64 data of a PDF. I am trying to save the PDF as Attachment under an object. I ...
0
votes
2answers
454 views

Attach a file from local system to salesforce using Apex [closed]

The requirement is to attach file from local system through local path using Apex. Here file path is give by the client for example 'D:\image\img1'. The same has to be attached to the given record ...
1
vote
4answers
2k views

Query CustomObject with Attachment

I want to select the fields name__c and description__c from my CustomObject along with the attachments from the attachment object. Can I do this with my query below? What should i write in my inner ...
0
votes
1answer
522 views

Single Email message with attachment not sending email

I want to send a email with attachment, for that using below code public Attachment attachment { get { if (attachment == null) attachment = new Attachment(...
0
votes
1answer
673 views

Update an existing attachment's body via REST Api

I'm trying to find a way to update an attachment's body from a custom visual force page I've created. I have the attachment ID but when I try to call a PATCH web request on the URL: http://appid....
0
votes
2answers
44 views

How to view attachment content?

I would like to see the Attachment body in plain string, but cannot find out how. For ex: Attachment a = [SELECT Id, Name, Body, ContentType, ParentId FROM Attachment WHERE ParentId = '...
0
votes
1answer
188 views

how to add xml tag as body in the attachment?

I am trying to form dynamic package.xml in my code.So i want a sample template as attachment under a object.I tried as below.It's not working . Code:- String str='<?xml version="1.0" encoding="...
0
votes
1answer
307 views

getcontent() method not working, while generating the CSV file , no data (content) exit in csv

I'm trying to create a csv file attached to a visualforce email template. When i comment "strOut = new PageReference(requestURL).getContent().toString(); " then it generate a CSV file with no data. ...
1
vote
0answers
128 views

Unable to restrict users to delete attachments sharing from quick actions

Some users need to attach files to opportunities even though they don't own the record. So these users are uploading through quick actions like file in opportunity record. We are restricting users to ...
2
votes
2answers
3k views

Cloning Attachment

I'm in need of a button that will clone attachments. I have a list of attachments coming from a child object of the case, I am trying to create a button where if the user clicks, it will clone the ...
2
votes
0answers
151 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
67 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 ...
-4
votes
1answer
254 views

System.NullPointerException: Attempt to de-reference a null object: () [closed]

I'm getting the error at line 12 i.e List{attachment} attachmentsToInsert = new List{Attachment}(); Could someone help, please? I've enabled the enhance email. Error message: Apex trigger ...
0
votes
0answers
506 views

How to attach multiple files in a visualforce page like as in gmail

Attach file button should have the capability adding multiple files at a time and deleting one among the uploaded files. Just like we have this in gmail. Right now, I have ability to upload a single ...
0
votes
1answer
153 views

How to send the Case attachment in an alert email using VF Email Template?

I want to send the Case attachment in an email to Risk & Legal team when Manager approves the request. For this I have created the VF Email Template (Because in Email Template I have header, ...
0
votes
1answer
65 views

Visualforce Email template not creating attachment

I have a VisualForce template for an email, and this also has a PDF attachment similar to the email itself. When I run the Send Test and Verify Merge Fields it creates it fine, populates the fields ...
0
votes
2answers
4k views

How to attach multiple files to a VF page using one button

Can any one suggest if there is any package or useful link for this. As of now, I have a button on my visualforce page, where I can upload one document. If i select another document again, the 1st ...
2
votes
1answer
628 views

getContentAsPDF: Not generating custom Visualforce page

EDIT: I have no problem viewing the page and it does display the fields but my problem is when you generate content as pdf it does not show the visualforce page content in the PDF I have a standard ...
0
votes
1answer
6 views

Unable to attach call logs for opportunity with out ownership access

Hi friends in my organisation org-wide defaults for opportunity is Private. But some users have acess view all opportunities,read access and create access. But if they want to attach calls they need ...
3
votes
3answers
1k views

Converting Attachements to Files - App on the AppExchange

As we all know that going forward Salesforce is going to remove the Attachments and would require all Attachments to be converted into 'Files'. However, I am unable to find this Option to convert ...
2
votes
1answer
146 views

Visualforce Email Template PDF Attachment - Hide Table base on query result

I have a PDF attachment created via visualforce email template. I have a controller grabbing all quote line items, but would like to section off the line items based on a field (which I was able to ...
1
vote
1answer
430 views

Trigger to prevent record saving without attachment

I am new to Salesforce and trying to write a trigger with the picklist values yes or no. If value 'YES' is selected then trigger should fire and display "an attachment is required", if the value is '...
0
votes
1answer
21 views

Missing edit option on some Attachments

From some of my attachments edit option is not visible for me. Why would that be?
0
votes
0answers
2k views

Get ContentDocument Id and ContentVersion Id of an attachment

I have to retrieve all the attachments of a custom object (of all records) and list them out with thumbnail and preview option. For the preview option, I need the ContentDocument id and for the ...
2
votes
1answer
717 views

Visual Workflow - Issuing with copying email attachment to new email

I am trying to create a flow that can duplicate an email message including attachment onto a new case from an existing case that has been closed. So far I have been able to create the flow as ...

1
3 4
5
6 7
13