In this Salesforce tutorial, we will learn to attach files in Salesforce Record Pages and Email templates and discuss this method of attaching files in Salesforce Lightning and Salesforce Classic.
Attach Files to the Records in Salesforce
In Salesforce, attaching files to records is a better way to organize the information. With the help of these attachments, we can share information with anyone having access to these records. We can attach files such as MS Office documents, PDFs, images, and videos to most Salesforce records through the Files.
While working as a system administrator for an organization that uses Salesforce as a CRM tool, I was asked to attach files to the opportunity record pages. The reason behind that was the sales team, which frequently interacts with clients by sharing various documents, such as reports, contracts, and presentations. They decided to attach files to Opportunity Records to organize their sales processes and keep all required information in one place.
I will explain how to attach files to records using examples, and you can follow the same procedure to attach various files and documents to records of Cases, tasks, and campaigns.
We will discuss the file attachment in Salesforce through the following points.
- Attach Files to the Records in Salesforce Lightning
- Attach Files to the Records in Salesforce Classic
- How to attach a file to an email template in Salesforce
- Attach Files to Multiple Records in Salesforce
Limitations for attaching files in Salesforce
There are some limitations to uploading these attachments to Salesforce records.
- In Salesforce Classic, the size limit for the attached file is 25 MB, while in Salesforce Lightning, it is 2GB.
- The file size limit for Chatter feed attachments is 2 GB.
- The size limit for an email message, including attachments, is 25 MB.
- If the Don’t allow HTML uploads as attachments or document records security setting is enabled for your organization, you can’t upload files with the following extensions: .htm, .html, .htt, .htx.
- Uploads from the Files-related list aren’t supported in the Salesforce mobile app.
- Salesforce doesn’t remove geolocation information from uploaded images.
Attach Files to the Records in Salesforce Lightning
To attach Files to the records in Salesforce Lightning, navigate to the Setup page and follow the below steps.
1. On the Setup page, click on the App Launcher and navigate to the object tab, where you attach files to records.

2. Select the record to which you want to attach files. In this case, I have selected the opportunity Edge Emergency Generator.
