Importing Notes to Organization and Contact Records using the Apex Data Loader
The ability to attach notes to Organization and Contact records exists within Salesforce. These can be added individually by going to the organization or contact record, but you can also import a number of notes at once from an outside system. This post will show you how to prepare the .csv file for importing the notes.
Unlike most updates in the system that can be done through the native Salesforce Data management tools, this process requires the use of the Apex Data Loader to update the records. Please visit this post for information on how to download the Apex Data Loader and for directions on accessing your Security Token which is also needed.
NOTE: The same process can be followed to import notes into other records, you just need to make sure that you have the Salesforce.com ID for the record you wish to attach the note.
Creating the Table
The unique thing about notes is that the table is, for the most part, created outside of Salesforce reports.
To import Notes to the Organization or Contact record you need the following:
Organization or Contact Salesforce.com ID (Required)
Organization or Contact Name (optional)
Title (of the note)
Body (content of the note)
Private (privacy of the note)
A template for Importing Notes can be found in the Shared Resources
Getting the Salesforce.com ID
There are two ways to access the Salesforce.com ID for Organizations and Contacts.
1) Go to the Organization or Contact record and copy the ID from the URL
2) You can run a report that includes the Organization or Contact name and the Salesforce.com ID.
For this example, we will create a new Report
Go to Reports and click on the Create New Custom Report button.
Select Category: Organizations & Contacts
Select Report Type: Contacts & Organizations
Once in the Create a Report screen:
1) Add the filters, if any, to yield the Organizations or Contacts that you need for importing the notes.
2) Show: All Organizations
3) Date Field: Created Date (Can modify if necessary to get the desired records)
4) Range: All Time (Can modify if necessary to get the desired records)
5) For this report, I believe it is easier to start with a blank slate, so click on Remove all Columns. You can opt to leave the columns, but here's the information that you need:
6) Columns to Add
Organization ID (Salesforce.com ID field)
Contact ID (Salesforce.com ID field)
7) Run Report
Populating the Table
Once you have the Saleforce.com ID(s) you can now populate the Notes template as needed.
Required Fields are:
Title (Up to 80 characters)
Body (up to 32KB of Data)
Private (Should be populated with TRUE or FALSE)
Once you have all the notes that you want to import, save the file and open the Apex Data Loader to perform an Insert.
Apex Data Loader
Open the Apex Data Loader and Select Insert
Enter your username and password.
The password is your usual password followed immediately by the security token: PasswordSecurityToken
Click Login, and then once successful click Next
From the Select Salesforce Object
1) Check the box for Show all Salesforce objects
2) Select Note (Note)
Then click Browse to locate the file with the notes
Then click Next
The system will initialize the file and confirm for you how many records (rows) are in your table.
You will now map the items in your table to the items in HandsOn Connect.
1) Click on Create or Edit Map
2) If you didn't change the names of the column headers in the template, you can select "Auto-Match Fields to Columns" and all but the ID field will be mapped. For the Organization/Contact ID field, you will need to manual click and drag the field labels from the top to the bottom.
The fields should be mapped as follows:
Body to Body
Organization/Contact ID to ParentId
Private to IsPrivate
Title to Title
3) Once all the fields are mapped as needed, click on OK
Confirm that your fields are mapped correctly and click Next
Every time you use the Data Loader, two log files are created, an error log and a success log. Click Browse to identify a location where you want those logs saved.
Once you have identified the location for the log files, click Finish.
It will provide you with a warning message that once updated, it can't be undone. Click OK
While the records are being uploaded, you'll see a progress bar indicating how many successes and errors are occurring along the way, if any errors, and how much time it will take.
Once the file has finished uploading, you'll receive a confirmation message. You can look at the error and success logs, or click OK to close the window and open the Error and Success logs from their saved locations.
Once it is completed, please check to ensure that the Notes were Imported properly.
Add your comment