1. Purpose & Scope
This document outlines the standard procedure for bulk-uploading documents (specifically PDFs) to the "Documents" tab within a Salesforce org using Data Loader.
This process is designed for efficiency with large batches of files (approximately 50 or more) for Fund Documents, Fundraising and Client Wide Documents, it does not cover Commitment documents or Fund Communication Documents. For a small number of files, manual uploading through the Salesforce interface is recommended.
The procedure is a two-phase operation:
Phase 1: Creating "Document" records in Salesforce, which act as containers.
Phase 2: Uploading the actual files as "Attachments" and linking them to the Document records created in Phase 1.
2. Pre-Upload Requirements & Considerations
Before starting, please verify the following:
File Access: All source PDF files must be located in a single, accessible folder on a local or network drive.
Data Loader: You must have Salesforce Data Loader installed and the necessary user credentials with API access to the target org.
File Naming:
Filenames must not contain invalid characters (e.g.,
*,?,/,\).The display name (
Name) is limited to 80 characters.The full file path (
FullName) is limited to 255 characters. This includes the drive letter, all folders, and the filename itself (e.g.,C:\Users\Admin\Documents\Uploads\My_File.pdf).
File Format: This specific guide is written for PDF files only. The
ContentTypevalue in Step 2 will need to be changed if other file types are used.File Size: Document files must be 5mb or less. For larger files up to 40mb, use the Document Uploader - Portal tool to properly upload and split the file.
Salesforce Setup: The target folders (Type/Document Subtype/Fundraising Type) must already exist in the Salesforce org before you begin. You will also need the 18-character
RecordTypeIDfor the "Fund Document" Record Type.
3. Step-by-Step Upload Process
This process requires preparing two CSV files, uploading the first, updating the second, and then uploading the second.
Step 1: Populate the 'Documents' Template
First, create a CSV file to generate the master "Document" records in Salesforce.
Column | Field Name | Description |
|---|---|---|
A | Full Name | The full name to be displayed for the document in Salesforce (up to 255 characters) |
B | Document Name | A unique name for the document. Can be a duplicate of Column A, but must be 80 characters or less. |
C | Portal Document | Always set to |
D | Document Date | The date to be displayed for the document. (Format: |
E | Type | Set to associated type,(note that Capital Calls are generally stored in the Financial type. Standard types: General, Fundraising, Legal, Stock Distribution, Tax, Advisory Board, Capital Call, Cash Distribution, Financial. |
F | Fundraising Type | Must include if the type is set to Fundraising. The exact name of the destination folder in Salesforce. This folder must exist prior to the upload. |
| G | Document Subtype | Only include if needed. |
H | RecordTypeID | The 18-character Salesforce ID for the Fund Document, Commitment, or Client Wide Document Record Type in the target org. |
I | Fund ID | The 18-character Salesforce ID for the specific Fund record this document relates to. |
Step 2: Populate the 'Attachments' Template
Next, create a second CSV file to prepare the actual files for upload.
Column | Field Name | Description |
|---|---|---|
A | Document ID | Must be an exact copy of Status column from the 'Documents' template upload. This is the key for linking the file to its record. You will populate this after Step 3. |
B | ContentType | For PDFs, this is always |
C | Path | Formula; The full file path to the source file on your computer. (e.g., |
| D | Length | Formula to verify that path lengths are under 255 characters |
| E | File Name | Must match the file name exactly. |
| F | Folder | Must match the path in your system exactly. Consider using a different folder if the folder path is long. |
Step 3: Insert 'Document' Records (Data Loader)
Open Data Loader and log in to the client org.
Click "Insert".
Select the "Document" object. (You may need to check "Show all Salesforce objects").
Browse and select your completed 'Documents' template CSV from Step 1.
For step 2b, set RecordType to look up by Name.
In the mapping dialog, use the mapping file provided (DocumentUpload.sdl)
Run the insert.
When complete, SAVE THE "SUCCESS" FILE. This file is critical as it contains the newly created Salesforce
IDfor each Document record.
CRITICAL: Save the Success File
The "Success" file generated by Data Loader is not just a confirmation. It contains the new 18-character Salesforce IDs for every record you just created. You cannot proceed to the next step without this file.
Step 4: Update the 'Attachments' Template (VLOOKUP)
Open the 'Attachments' template CSV from Step 2.
Open the "Success" file from Step 3.
You now need to populate
COLUMN A - Document IDin your 'Attachments' file.Use an Excel
VLOOKUPfunction to do this.The
VLOOKUPwill look atCOLUMN E - Document Namein your 'Attachments' file.It will find the matching "Document Name" in the "Success" file.
It will return the corresponding
IDfrom the "Success" file and place it inCOLUMN A - Document ID.Example Formula:
=VLOOKUP(E2, [SuccessFile.csv]!$A:$B, 2, FALSE)(This assumes the Document Name was in Column E and the new ID was in Column B of your success file. Adjust as needed.)
Step 5: Insert 'Attachment' Records (Data Loader)
In Data Loader, click "Insert" again.
Check the "Show all Salesforce objects" box.
Select the "Attachment" object.
Browse and select your updated 'Attachments' template CSV from Step 4 (which now has the
Document IDs).Map your columns using the "File Mapping.sdl" attached to this article.
Run the insert. Data Loader will now read each row, find the file at the specified
Path, and upload it to the Salesforce record specified in theParentIdfield.Save the final success and error files for your records.
4. Verification
After both inserts are complete, spot-check 5-10 records in Salesforce.
Navigate to the Fund record.
Go to the Fundraising tab.
Locate one of the uploaded documents.
Confirm the name, date, and folder are correct.
Click the document to ensure the PDF opens correctly.
If you encounter any errors, please refer to the "error" file from Data Loader to troubleshoot.