Create Metadata for Your Package

In this exercise, you will…

  • Create a new custom object named “Travel Expense”
  • Add a custom field named “Amount” to the “Travel Expense” object

Create a new custom object named “Travel Expense”

These steps should be carried out inside of your Packaging Org.

Step 1 of 2: Use the Object Manager to create a custom object

  1. Open Setup, then click on the Object Manager tab.
  2. Click the Create drop down button.
  3. Click the Custom Object menu item.

Step 2 of 2: Define a custom object named “Travel Expense”

On the New Custom Object screen…

  1. Enter Travel Expense as the Label, and Travel Expenses as the Plural Label.
  2. Make sure the Object Name is set to Travel_Expense.
  3. Make sure the Record Name is set to Travel Expense Name and the Data Type is Text.
  4. Click Save to continue.

After saving your custom object, your screen should look something like this:

Add a custom field named “Amount” to the “Travel Expense” object

Starting from the Object Manager page for the Travel Expense object, execute the following steps.

Step 1 of 5: Use the Object Manager to create a new field

  1. Make sure you’re on the Travel Expense object.
  2. Click on Fields & Relationships.
  3. Click on the New button.

Step 2 of 5: Choose the field type

  1. Choose the Currency data type.
  2. Click Next to continue.

Step 3 of 5: Enter the details for this field

  1. Set the Field Label to Amount.
  2. Set the Length to 16.
  3. Set the Decimal Places to 2.
  4. Make sure the Field Name is set to Amount.
  5. Click Next to continue.

Step 4 of 5: Establish field level security

  1. Accept the default values for Visible.
  2. Click Next to continue.

Step 5 of 5: Add to page layouts

  1. Make sure that the checkbox for Add Field next to Travel Expense Layout is checked.
  2. Click Save to finish.

After saving your custom field, your screen should look something like this:

Updated: