data import of attachements   Leave a comment

Importing Attachments with the Apex Data Loader
You can use the Apex Data Loader to import attachments to Salesforce.
1. If you are migrating attachments from a source Salesforce organization to a target Salesforce organization, begin by
requesting a weekly data export for the source organization. On the Schedule Export page, make sure to select the Include
Attachments... checkbox, which causes the file Attachment.csv to be included in your export. You can use that file
in the next step. For more information on the weekly export service, see "Exporting Backup Data" in the Salesforce online
help.
2. Confirm that the CSV file you intend to use for attachment importing contains the following columns (each column
represents a Salesforce field):
•
•
•
•
•
ParentId - the Salesforce ID of the parent record.
Name - the name of the attachment file, such as myattachment.jpg.
IsPrivate - "0" if the attachment is not private; "1" if it is private.
OwnerId - the Salesforce ID of the record owner.
Body - the Salesforce ID of the attachment.
3. Edit the values in the Body column so they contain the full filename of the attachments as they exist on your computer.
For example, if an attachment with the ID "123456789" is located on your computer at C:\Export, then set the value as
C:\Export\123456789. For reference, see this sample CSV file.
4. Proceed with an insert or upsert operation; see Inserting, Updating, or Deleting Data on page 7. At the Select data
objects step, make sure to select the Show all Salesforce objects checkbox, and the Attachment object name
in the list.
Note: If your CSV file includes a column of pure attachment ID values, you can use a Microsoft Excel formula field
to prepend the directory path in front of the ID value.

Posted 2011年07月20日 by gw8310 in salesforce

发表评论

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / 更改 )

Twitter picture

You are commenting using your Twitter account. Log Out / 更改 )

Facebook photo

You are commenting using your Facebook account. Log Out / 更改 )

Google+ photo

You are commenting using your Google+ account. Log Out / 更改 )

Connecting to %s

%d 博主赞过: