Create an Expense Item Object
In the previous steps, you created the travel app and custom objects for Department and Travel Approval. The final object you create is the Expense Item object. This allows the app to provide estimates for trip costs such as airfare, hotel, or rental car.
- Navigate back to Object Manager.
- Click Create then select Custom Object.
- Enter these details:
Field
Value
Label
Expense Item
Plural Label
Expense Items
Starts with vowel sound
Check/select this option
Object Name
Expense_Item
(this field auto-populates)
Record Name
Expense Item Number
Data Type
Auto Number
Display Format
E-{00000}
Starting Number
1
- Select Allow Reports.
Note: Don’t select Launch new Custom Tab Wizard after saving this custom object. You don’t need a separate tab for just Expense Items. Users will use the Travel Approval tab to navigate to specific records and then drill down to expense items from the select travel approval. - Click Save.
Next, you’re directed to the standard object configuration page for the Expense Item object, where you create its fields. Start with the Amount field.
- Click Fields & Relationships, and click New.
- For data type, select Currency.
- Enter these details.
- For Field Label, enter
Amount
- For Length, enter
16
- For Decimal places, enter
2
- Select Required
- For Field Label, enter
- Click Next, Next, then Save & New.
Next, create the Expense Type field.
- Select Picklist as the data type.
- Select Enter values, with each value separated by a new line.
- Add these values:
- Airfare
- Hotel
- Rental car
- Meals
- Other
- Select Required.
- Click Next, Next, then Save & New.
Create the Travel Approval field.
- Select Master-Detail Relationship data type, click Next.
- Select Travel Approval from the Related To menu.
- Click Next four times, then click Save.
Now, see how the travel approval app looks. Click to open the App Launcher, then search for and select Travel App with the two new tabs you created.