Skip to main content
Join the Agentforce Hackathon on Nov. 18-19 to compete for a $20,000 Grand Prize. Sign up now. Terms apply.
Geschätzte Zeit
Themen
Die Community fragen

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.

  1. Navigate back to Object Manager.
  2. Click Create then select Custom Object.
  3. 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
  4. 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.
  5. 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.

  1. Click Fields & Relationships, and click New.
  2. For data type, select Currency.
  3. Enter these details.
    • For Field Label, enter Amount
    • For Length, enter 16
    • For Decimal places, enter 2
    • Select Required
  4. Click Next, Next, then Save & New.

Next, create the Expense Type field.

  1. Select Picklist as the data type.
  2. Select Enter values, with each value separated by a new line.
  3. Add these values:
    • Airfare
    • Hotel
    • Rental car
    • Meals
    • Other
  4. Select Required.
  5. Click Next, Next, then Save & New.

Create the Travel Approval field.

  1. Select Master-Detail Relationship data type, click Next.
  2. Select Travel Approval from the Related To menu.
  3. Click Next four times, then click Save.

Now, see how the travel approval app looks. Click App Launcher icon to open the App Launcher, then search for and select Travel App with the two new tabs you created.

Travel Approval app with Departments and Travel Approvals tabs highlighted.

Teilen Sie Ihr Trailhead-Feedback über die Salesforce-Hilfe.

Wir würden uns sehr freuen, von Ihren Erfahrungen mit Trailhead zu hören: Sie können jetzt jederzeit über die Salesforce-Hilfe auf das neue Feedback-Formular zugreifen.

Weitere Infos Weiter zu "Feedback teilen"