Tuesday 30 April 2013


Importing Data

In this section, you will import sample project and resource data into the Force.com database
using the Data Loader tool.This process is divided into three stages: preparing the
data, importing it, and then verifying it visually using the native user interface.This is certainly
not the only way to import data into Force.com, and probably not the easiest. But
it employs a free, widely used, fully supported tool from Salesforce that can scale up to
support large numbers of records and complex objects.

Data Preparation

Data Loader operates on CSV files.The first line of the file contains a header listing the
columns present in the data.The following lines are the body of the data, with each line a
record, values separated by commas.You should have access to Microsoft Excel or an
equivalent tool for working with CSV files.
To begin, export CSV files for the Project and Resource objects. Because no data exists
yet in the database, these files will be empty except for the header line.This serves as a template
for the import file, conforming the data to the layout expected by the Data Loader.

To export, perform the following steps:
1. Launch Data Loader. Click the Export button.
2. Enter your username and password and click the Log In button. Make sure your
password includes a Security Token appended to it. If you have not yet obtained a
Security Token, log in to Force.com using your Web browser, navigate to Setup ➝
My Personal Information ➝ Reset My Security Token, click the Reset Security
Token button, and get the Security Token from the email sent to you by
Force.com. Click the Next button when your login is completed.
3. Select the object to export, and click the Browse button to name the export file
and specify its directory. Name the file the same as the object name, and save it
where you’ll readily find it, such as the desktop.Then click the Next button.
4. Click the Select All Fields button.Then remove the system fields, which are ID,
OwnerId, IsDeleted, CreatedDate,CreatedById, LastModifiedDate, LastModified-
ById, and SystemModstamp. Click the Finish button.
5. Answer Yes to the confirmation dialog.The export is performed, and a summary
dialog is shown. Click the OK button to dismiss it.You now have a CSV file on
your desktop containing a single line with the names of the exported fields.

No comments:

Post a Comment