How to Add Attachment Field in Salesforce
- Sophie Ricci
- Views : 28,543
Table of Contents
Salesforce does not use a traditional “attachment field” in the same way a form might have a file input box. Instead, it handles file uploads through a feature called Files (previously called Attachments in older orgs). You can attach documents, images, PDFs, and other files directly to any record — a contact, opportunity, account, or custom object.
As of Salesforce Lightning Experience, the platform uses the Files component, which is powered by Salesforce Files (formerly Chatter Files). According to Salesforce’s own usage data, organizations that adopt Salesforce Files see up to 40% faster document retrieval compared to managing files outside the CRM.
Understanding how to properly configure this can save your team hours every week and keep all your client-facing documents in one centralized, searchable place.
Why Adding Attachment Capability Matters
Before diving into the steps, it is worth understanding why this matters for your workflow.
Over 91% of organizations that use a CRM report that centralized document storage directly improves team collaboration (Salesforce State of CRM Report). When your team can access proposals, contracts, or compliance documents directly from a record, deals move faster and fewer things fall through the cracks.
Here are the primary use cases where attachment fields or file uploads inside Salesforce make an immediate difference:
- Storing signed contracts against an opportunity record
- Attaching onboarding documents to a new account
- Uploading product spec sheets to a quote
- Keeping compliance forms linked directly to a contact
The goal is simple: fewer tools, fewer tabs, and fewer lost files.
How Files and Attachments Work in Salesforce
Salesforce has two systems depending on how your org was set up:
Salesforce Files (Lightning): The modern system. Files are stored in a content library and linked to records. This is the default for any org created after 2019.
Classic Attachments: An older system where files were stored as binary data directly on a record. Still active in many legacy orgs, but Salesforce recommends migrating to Files.
Knowing which system your org uses will determine the exact steps you follow below.
How to Add the Files Component to a Page Layout
This is the most common need — making sure users can upload files directly from a record page.
Step One: Go to the Object Manager
Log in to Salesforce and click the gear icon at the top right. Select Setup. In the left panel, click Object Manager. Choose the object you want to configure — for example, Opportunity, Contact, or any custom object.
Step Two: Open Lightning Page Layouts
Inside the object, click Lightning Record Pages (for Lightning Experience) or Page Layouts (for Classic). If you are in Lightning, click Edit next to the layout you want to modify.
Step Three: Add the Files Component
In the Lightning App Builder, look at the left panel under Standard Components. Scroll until you find the Files component. Drag and drop it onto the record page where you want it to appear — typically in the right column or below the activity timeline.
Click Save, then Activate the page to make it live for all users.
Step Four: Verify Permissions
If users cannot see or upload files after the component is added, the issue is usually permissions. Navigate to Setup → Profiles or Permission Sets, find the relevant profile, and ensure Salesforce CRM Content or Files permissions are enabled.
How to Allow File Uploads on a Custom Object
If you have built a custom object and want to attach files to its records, you need to enable a specific setting.
Step One: Locate the Custom Object
Go to Setup → Object Manager → [Your Custom Object]. Click Edit on the object definition.
Step Two: Enable the Notes & Attachments Option
Scroll down in the object definition until you see Optional Features. Check the box next to Allow Notes & Attachments. Click Save.
This will make the Notes & Attachments related list available on that object. You can then add it to the page layout via Page Layouts → Related Lists.
How to Use a File Upload Field in Flows or Forms
If you are building a Salesforce Flow or using Experience Cloud (formerly Community Cloud) and want end users to upload files as part of a process, Salesforce provides a built-in File Upload screen component.
Adding File Upload to a Screen Flow
Open Flow Builder from Setup. Create or edit a Screen flow. Click on a Screen element. In the component panel on the left, search for File Upload. Drag it onto the screen. Configure the following:
- Allowed File Types: Restrict uploads to specific extensions like .pdf, .docx, or .jpg
- Multiple Files: Toggle on if users should be able to upload more than one file at once
- Label: Set a descriptive label so users know what to upload
After the screen, use a Create Records element to associate the uploaded ContentDocumentId with the relevant record in Salesforce.
According to Salesforce research, organizations using guided flows for document collection reduce data entry errors by up to 52% compared to manual record updates.
How to Add an Attachment Field Using a Custom Field (Workaround)
Salesforce does not natively support a “file” type as a standard custom field on an object. However, there is a practical workaround if you need a lightweight attachment experience without flows.
Option: Create a URL Field to Reference Files
Go to Object Manager → [Object] → Fields & Relationships → New. Select URL as the field type. Label it something like “Supporting Document Link.” This allows users to paste a shareable link (Google Drive, SharePoint, Box, etc.) directly on the record.
This is especially useful for teams that store documents in external cloud storage but want visibility inside Salesforce without managing Salesforce’s content storage limits.
Salesforce’s file storage limit starts at 1 GB per org, with 614 MB per user added with each license. Many teams supplement this by linking to external storage and keeping a URL reference inside Salesforce.
How to Make the Related Files List Visible for All Users
Even after configuring the Files component, some users may not see uploaded files on a record. This is almost always a page layout issue.
Go to Setup → Object Manager → [Object] → Page Layouts → Edit. In the layout editor, scroll to Related Lists. Find Files in the available related lists on the left and drag it into the Related Lists section of your layout. Click Save.
Repeat this for every page layout assigned to the profiles that need access.
Tips for Managing File Uploads at Scale
Once you have the attachment capability set up, keeping files organized becomes the next challenge. Here are the practices that work best for growing teams:
Use Content Libraries: Salesforce allows you to create shared libraries where files can be organized into folders. Navigate to the Files tab → Libraries to set this up.
Set Sharing Rules for Files: Files in Salesforce follow their own sharing model. A file uploaded to a record is accessible to all users who have access to that record, but a file in a library may need explicit sharing.
Audit File Storage Regularly: File storage fills up faster than expected. Navigate to Setup → Company Information to view your current storage usage. Salesforce’s data shows that unmanaged orgs can hit storage limits within 18 months of active use.
Enforce File Naming Conventions: Without naming standards, finding the right version of a contract or proposal becomes a nightmare. Create a simple convention like [AccountName]_[DocumentType]_[Date] and train your team on it.
Common Errors and How to Fix Them
“Insufficient Privileges” when uploading a file This means the user’s profile does not have permission to create ContentDocument or ContentVersion records. Fix it by editing the profile under Setup and enabling CRM Content permissions.
Files component not showing on the record page The page layout may not be activated for the right audience. Go to the Lightning App Builder, check the activation settings, and make sure the page is assigned to the correct profile or app.
Attachments showing in Classic but not in Lightning Classic Attachments and Lightning Files are stored separately. You may need to run Salesforce’s Files Migration Tool to move legacy attachments into the modern Files system. Salesforce recommends completing this migration before fully deprecating Classic in your org.
Flow file upload not saving to the correct record This usually happens when the ContentDocumentLink is not created after the file upload screen. Make sure your flow includes a Create Records step that creates a ContentDocumentLink linking the uploaded file’s ContentDocumentId to your record’s Id.
Salesforce Files vs Classic Attachments — A Quick Comparison
Feature | Salesforce Files (Lightning) | Classic Attachments |
Max File Size | 2 GB per file | 25 MB per file |
Searchable | Yes | Limited |
Version Control | Yes | No |
Sharing Controls | Granular | Record-based only |
Mobile Access | Full | Limited |
Recommended | ✅ Yes | ❌ Legacy only |
The numbers make the case clearly. Salesforce Files is the superior system in virtually every category. If your org is still on Classic Attachments, migrating is worth the effort.
Conclusion
Adding attachment capability in Salesforce is straightforward once you understand which system your org uses. If you are on Lightning, the Files component is your primary tool — add it to page layouts, configure permissions, and your team can start uploading immediately. For custom objects, enable Notes & Attachments in the object settings. For guided processes and external users, a Screen Flow with a File Upload component gives you full control over what gets uploaded and where it goes.
The biggest mistake most teams make is setting up files reactively — waiting until documents are scattered across email chains and shared drives before centralizing them in Salesforce. Start with one object, get the workflow right, and expand from there.
A well-organized Salesforce instance is only one piece of a productive sales system. If you are also looking to build a consistent pipeline of qualified conversations — without relying entirely on inbound or referrals — that is where a complete outbound strategy makes the difference.
📎 Turn Data Into Booked Meetings
We build outbound systems that target your ideal clients and scale results.
7-day Free Trial |No Credit Card Needed.
FAQs
How do I add an attachment field in Salesforce for a custom object?
What is the maximum file size for attachments in Salesforce?
Can I restrict what file types are uploaded in Salesforce?
Does Salesforce charge extra for file storage?
We deliver 100–400+ qualified appointments in a year through tailored omnichannel strategies
- blog
- Cold Emailing, Sales Development
- How to Add Attachment Field in Salesforce