How to import attachments using data loader in salesforce?
Answer / Sumit Kudesia
To import Attachments using Data Loader, first export the Attachment object and then create a CSV file for Attachments. Here's an example for a simple scenario:
1. Export Attachments: Go to Setup > Data > Data Export, select Attachment, choose the desired date range (Last Month/30 Days) and click on 'Export Now'. Download the `unfilteredAttachments.csv` file.
2. Create a CSV file for Attachments: Open the downloaded `unfilteredAttachments.csv` file, remove unnecessary columns, and keep only required columns like: ContentType, BodyLength, ParentId, Uid, IsPrivate, Subject, whatId, CreatedDate, LastModifiedDate, SystemModstamp.
3. Prepare Attachment Data: Add the new attachment data as follows:
```makefile
ContentType,BodyLength,ParentId,Uid,IsPrivate,Subject,whatId,CreatedDate,LastModifiedDate,SystemModstamp,Attach_Data__c
text/plain;charset=UTF-8,23,"001a0000005A000","600100000008777","false","Test Attachment","001a0000005A000",2022-01-01T00:00:00.000Z,2022-01-01T00:00:00.000Z,2022-01-01T00:00:00.000Z,"Base64Encoded Attachment Data"
```
Replace `Base64Encoded Attachment Data` with the Base64 encoded data of your attachment.
4. Import Attachments: In Data Loader, select 'Attachments' as the object and load your prepared CSV file.
| Is This Answer Correct ? | 0 Yes | 0 No |
Do I always create an app bundle first when develop lightning component ? : salesforce lightning component
Can we include external javascript/css libraries in components?
What is a Sharing Rule?
How to call parent component method from child component without using events? : salesforce lightning component
What is Approval Processing?
How do you implement soap web services in apex ?
What is trend report? : salesforce admin
What all data type can be used as controlling fields? : salesforce objects & fields
How do users see report headers while scrolling? What to do to enable this floating report header?
Can you use sharing rules to restrict data access?
Does lightning work with visualforce ?
How many certifications are available in salesforce?