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
- Open Setup, then click on the Object Manager tab.
- Click the Create drop down button.
- Click the Custom Object menu item.

Step 2 of 2: Define a custom object named “Travel Expense”
On the New Custom Object screen…
- Enter
Travel Expense
as the Label, andTravel Expenses
as the Plural Label. - Make sure the Object Name is set to
Travel_Expense
. - Make sure the Record Name is set to
Travel Expense Name
and the Data Type isText
. - 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
- Make sure you’re on the Travel Expense object.
- Click on Fields & Relationships.
- Click on the New button.

Step 2 of 5: Choose the field type
- Choose the
Currency
data type. - Click Next to continue.

Step 3 of 5: Enter the details for this field
- Set the Field Label to
Amount
. - Set the Length to
16
. - Set the Decimal Places to
2
. - Make sure the Field Name is set to
Amount
. - Click Next to continue.

Step 4 of 5: Establish field level security
- Accept the default values for Visible.
- Click Next to continue.

Step 5 of 5: Add to page layouts
- Make sure that the checkbox for Add Field next to Travel Expense Layout is checked.
- Click Save to finish.

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