Insert Attachments Using Data Loader

1,407 views
Skip to first unread message

Anajime

unread,
Nov 17, 2010, 9:57:08 AM11/17/10
to salesforce professionals
Hi Everyone,

I'm trying to attach several documents to Salesforce using the Apex
Data Loader, and I havea couple of questions.

I'm creating the csv file and I need the "Owner ID" to be in one of my
columns. I can see that the record owner is me but how can I find the
actual "Owner ID" number?

Here is an example of one on my files I want to import:
Name of Attachement: 200 Club of Hudson County $200 2009 membership
dues.pdf
Content Type: .pdf
File Path:C:\Documents and Settings\ajimenez\Desktop\bce3dn7ew
ParentId: 0068000000XDgRN
Record Owner: Ana Jimenez (this should be the Owner Id)

Also, I think all of my file names have spaces and I also included
their extentions on the names (example .pdf). Should I get rid of all
spaces and erase the extensions from the “Name of Attachment”
column ?

Thanks,
Ana

Jay Prakash

unread,
Nov 18, 2010, 2:18:35 AM11/18/10
to salesforce-p...@googlegroups.com
Here is the help:

How do I import attachments using my Data Export files?


    1. Create an attachments.csv file (the name of the file is unimportant) with the following column headers:
      • ParentId - ID of the record to which the attachment should be associated (Make sure you input the record ID here)
      • Name - Name of the attachment 
      • ContentType - Format of the extension (e.g. .xls, .pdf, etc) 
      • OwnerID - ID for the owner of the attachment (Make sure you input your User ID here - you can locate it following the path Setup->Manage Users->Users->Click on your name -- your UserID is visible as part of the url in the address bar)
      • Body - File path to the Attachment on the local machine (C:\documents and settings\schun\desktop\attachments\file.xls)
    2. Log in to the Data Loader. 
    3. Select the "Insert" command. 
    4. In the 'Select Sforce Object' step, select the 'Show all Sforce Objects' checkbox and then select "Attachments". 
    5. Choose the attachments.csv file. 
    6. In the mapping step, map the following fields:
      • Parent ID 
      • Name 
      • Owner ID 
      • Body - Make sure to map the Body column which you created previously with the file extension. This is how you designate the file and location of the attachments to be inserted. 
    7. Click "OK" to proceed with the insert. It may take a few minutes but the attachments should be successfully uploaded to your salesforce org.
    Jaya Prakash
     
     
     
     
     
     
     



    From: Anajime <anaj...@gmail.com>
    To: salesforce professionals <salesforce-p...@googlegroups.com>
    Sent: Wed, November 17, 2010 6:57:08 AM
    Subject: Insert Attachments Using Data Loader

    naga krishna prabhakar chimakurthy

    unread,
    Nov 18, 2010, 10:03:44 AM11/18/10
    to salesforce-p...@googlegroups.com
    great JP i have tested it its working thanks for the reply.
     
    thanks,
    prabhakar

    Ana Jimenez

    unread,
    Nov 18, 2010, 10:05:20 AM11/18/10
    to salesforce-p...@googlegroups.com
    Hi Jaya,
     
    Thank you, I followed your steps but I still have errors on all my files. the error message reads"error converting value to correct data type".
     
    Any ideas?
     
    Thanks,
    Ana

    Ana Jimenez

    unread,
    Nov 18, 2010, 10:20:54 AM11/18/10
    to salesforce-p...@googlegroups.com
    Does the name of the attachment have to be exctly the same as the name that I have it saved as on my desktop?

    Ana Jimenez

    unread,
    Nov 18, 2010, 10:29:06 AM11/18/10
    to salesforce-p...@googlegroups.com
    Also, I'm attaching a picture of the error msg I'm getting
    error msg.docx

    Saikishore

    unread,
    Nov 18, 2010, 11:36:28 PM11/18/10
    to salesforce-p...@googlegroups.com
    www.ezrakenigsberg.com

    look into this website... this is one of the person from salesforce whom i worked with.... this is his own website which has collection of so many important things... this might help you all..

    Thanks.
    --
    Thanks, Saikishore


    Saikishore

    unread,
    Nov 18, 2010, 11:37:50 PM11/18/10
    to salesforce-p...@googlegroups.com

    Ana Jimenez

    unread,
    Nov 19, 2010, 9:22:54 AM11/19/10
    to salesforce-p...@googlegroups.com
    Thank you all, I'll try the links
    Reply all
    Reply to author
    Forward
    0 new messages