To make the Warehouse app more realistic, you need invoices to track orders going in and out of the warehouse. When you created the app, the wizard created the Merchandise object for you. In this tutorial, you learn how to extend the app further:
You must complete all previous tutorials in this series, starting with Quick Tutorial 1: Build a Cloud App in 5 Minutes.
Log into your DE org, click <your_name> | Setup. Under App Setup, click Create | Objects, and then click New Custom Object. Fill in the form as follows:
Every time someone creates a new invoice, you want the record to have a unique identifier: INV-0001, INV-0002, and so on. That's easy — just set the data type for the standard Name field to Auto Number. Then fill in the rest of the fields as follows and click Save.
When you click on the Merchandise tab, a list of Merchandise records appears. Similarly, you need to create a tab that displays Invoices.
Because you selected Launch New Custom Tab Wizard ... in the previous step, you should now be looking at that wizard (if you're not here for some reason, just click <your_name> | Setup | Create | Tabs and click New).
To create a new app tab for invoices:
Take a look at the tabs across the top of your screen and you'll see the new Merchandise tab isn't next to the Invoice tab. That's not correct, but easy to fix. You can put tabs in any order you like.
Take a look at the tabs now.
If you try to create an invoice now, you won't be impressed. There're no fields that you can modify because they are all standard, auto-managed fields. In this step, you extend the Invoice object to add a new Status picklist field to track the status of each invoice.
Before moving on to the next step, take a look at the Help text in the screen above. This is another nice feature of the platform to be aware of. When users hover their pointer over the Status field, a pop-up bubble appears with whatever help text you specify. Although it's beyond the scope of our quick tutorial, understand that you can easily create unique translations for app labels and help text so that the app supports multiple languages, again, without building a single line of code. Very cool.
Although your app isn't completely done yet, you can create invoices and save them. It's not a problem that the invoice is still missing some fields, because when you add more fields to the Inventory object, the new fields will automatically appear on the records that already exist.
Click the Invoices tab again and notice there's a new invoice, with the number
INV-0001. Create another one with a Closed status.
You only have a few records so far, but how would the page look if you had hundreds of records? Thankfully, the default list view for a tab shows you only the most recent records you've touched and lets you page through sets with standard navigation controls.
Another feature to be aware of is views. A view is a customized presentation of data that shows only the fields you want, based on filters you define. For example, suppose you are only interested in open invoices with a price greater than $1000. You can create a custom view that shows exactly those records. It's a bit beyond the scope of this tutorial to go through that now, but if you're feeling up to the challenge, click Create New View and make one for yourself.
The database is starting to look better. But it's still incomplete. In the next tutorial, you will add another object, Line Items, and then relate it to other objects.