Skip to main content
Help shape the future of Headless 360 learning on Trailhead. Complete this short survey now through July 28.

Time Estimate

Topics

Ask the Community

Create a Travel Approval Object

In the previous units, you created the travel app using Lightning App Builder and created the first custom object for Departments. Now you create the object to store the Travel Approval requests.

  1. Navigate back to Object Manager.
  2. Click Create then select Custom Object.
  3. Enter these details.

Parameter

Value

Label

Travel Approval

Plural Label

Travel Approvals

Object Name

Travel_Approval (this field auto-populates)

Record Name

Travel Approval #

Data Type

Auto Number

Display Format

TA-{00000}

Starting Number

1
  1. Don’t click Save yet. You need to set a few more parameters first. Scroll down and select these additional options.
    • Allow Reports
    • Allow Activities
    • Track Field History
    • Allow Search
    • Add notes and Attachments related list to default page layout
    • Launch New Custom Tab Wizard after saving this custom object. Note: Be sure to check this box as it drives the next screens that will show. If you miss this option, you can create a custom tab by going to Setup, searching for and selecting Tabs, then creating a new tab after your object has been created.
  1. Click Save.
  2. Click Lookup icon next to Tab Style and select Airplane.
  3. Click Next.
  4. Keep the Add to profiles screen as is, and click Next.
  5. In the Add to Custom Apps screen, select the Include Tab checkbox to deselect all apps. Select Travel App, then click Save.
  6. On the object configuration page, click Fields & Relationships, then click New.
  7. Select Text Area as the data type, then click Next.
  8. For Field Label, enter Purpose of Trip.
  9. Click Next.
  10. Leave the Establish field-level security screen as is, and click Next.
  11. Keep the Add to page layouts screen as is, and click Save & New to create more custom fields. 
    To create the remaining fields for the Travel Approval object, follow the parameters below.
  12. Create the Status field with a Picklist data type. Click Enter values, with each value separated by a new line. Use these values:
    • New
    • Submitted
    • Pending Approval
    • Approved
    • Rejected
    • Draft
  1. Create the Trip Start Date field with a Date data type.
  2. Create the Trip End Date field with a Date data type.
  3. Create the Out-of-State field with a Checkbox data type.
  4. Create the Destination State field with a Text data type. Set the text Length to 2.
  5. Create the Department field with a Lookup Relationship data type, then select Department for the Related To field. Click Next 4 times, then Save.

You just created the Travel Approval object and created a lookup relationship to the Department object. In the next step, you create the Expense Item object, where each expense line item for the travel request is created.

Share your Trailhead feedback over on Salesforce Help.

We'd love to hear about your experience with Trailhead - you can now access the new feedback form anytime from the Salesforce Help site.

Learn More Continue to Share Feedback