Most organizations keep important data in all sorts of places, including documents and spreadsheets. In this tutorial, you learn how to load data that currently lives in a personal spreadsheet into the Warehouse app, where everyone in your organization can view and manage the data.
You must complete all previous tutorials in this series, starting with Quick Tutorial 1: Build a Cloud App in 5 Minutes.
The first step is to make a simple data file that you can use for this tutorial. There's a couple of ways to do this, depending on how realistic you want your experience to be.
The first way is to open a spreadsheet program on your computer (e.g., Microsoft Excel, Libre Office Spreadsheet, or Google's online spreadsheet). Then build a very simple spreadsheet that matches the following screen.
Next, save the spreadsheet data into a comma-separated value, or CSV-formatted text file. Most spreadsheet programs support this option via their Save As or Export menu option. Once you save the file, open it up in a text editor (e.g., Textpad on Microsoft Windows, Text Edit on Mac), and make sure it looks like the following:
"Merchandise Name","Price","Quantity" "17 Inch Monitor",99,200 "21 Inch Monitor",129,200 "25 Inch Monitor",179,200
If you don't want to use a spreadsheet to create the data file, or if the file you created doesn't exactly match the data above, then just copy the text above (use the handy copy function above), paste it into a text file, and then save it.
Some things to notice above:
Loading data from a CSV file into a custom object is simple using Force.com's Custom Object Import Wizard. To start the wizard, log into your DE org, and navigate to the Setup page (you probably know how to do this by now — if not, review previous tutorials). Next, you could start clicking Setup menus and trying to find the Custom Object Import Wizard, but there's an easier way — use the Quick Find feature of the Setup menu.
As the screen above shows, just enter in the word
import and click on the Import Custom Objects option to reveal the information page for the Custom Object Import Wizard. Feel free to read the information, then click the link at the bottom of the page, Start the Import Wizard.
The wizard is very intuitive and includes good descriptions on each page along the way.
Once you finish the wizard, Force.com queues the data load. When the load is finished, Force.com sends you an email with a report.
Make sure that all three records loaded into the Merchandise object, as shown above.
To see the new Merchandise records, go back to your app.
You should see a view similar to the following screen, confirming that the new records are there.
Feel free to click into each new record and confirm that the quantity and price for each record is correct.
There's another way to monitor the progress of data imports, especially large imports that might take some time to complete. From the Setup page, navigate to Administration Setup | Monitoring | Imports.
This tutorial completes your introduction to building a basic cloud database to support the Warehouse app. In the next tutorial, you will shift your attention to customizing the user interface of the app.