function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Case ManagerCase Manager 

Is it possible to insert Record and Attachment at the same time using Data Loader?

I have a question related to Data Loader, is it possible to insert records from CSV file and corresponding attachments at the same time using Data Loader.  If Yes, how is it possible? If Np, what are the alternatives?
KaranrajKaranraj
You can't do both at a time using data loader. Here is the alternative approach for this,

1. First upload the case record in the system.
2. Export uploaded case records from the salesforce along with  this fields Id,CaseNumber[or any common field in attachment csv file for lookup].
3. Then in the excel do the lookup with the attachment sheet to replace the case number with the salesforce id for mapping the attachment correctly to the corresponding record.
4. Replace the ParentId column in the attachment excel sheet with the case record id
5. Then upload the attachment csv file in the system

Note: In this example i took case number field, you take any field which you have mentioned in the attachment csv file to identify the attachment is belong to which case record.

Check this link https://help.salesforce.com/HTViewHelpDoc?id=loader_attachments.htm&language=en_US (https://help.salesforce.com/HTViewHelpDoc?id=loader_attachments.htm&language=en_US)
Case ManagerCase Manager
Thanks for your reply.  I would like to know if there is a way to automate the Data Loader process, I have tried running the Data Loader from Command Line but it did not work.  Please provide any useful resources if you know of any. 

Thanks in advance!
 
KaranrajKaranraj
Did you tried using DataloadCliq? https://code.google.com/p/dataloadercliq/ Its helps you to automate the data load process easily