In this step, you create a custom object called Book with one custom field called
Price.
Prerequisites:
A Salesforce account in a sandbox Professional,
Enterprise, Performance, or Unlimited Edition org, or an account in a Developer
org.
For more information about creating a sandbox org, see
“Sandbox Types and Templates” in the Salesforce Help. To sign up for a
free Developer org, see the Developer Edition Environment Sign Up Page.
-
Log in to your sandbox or Developer org.
-
From your management settings for custom objects, if you’re using Salesforce
Classic, click New Custom Object, or if you’re using
Lightning Experience, select .
-
Enter Book for the label.
-
Enter Books for the plural label.
-
Click Save.
Ta dah! You’ve now created your first custom object. Now let’s create a
custom field.
-
In the Custom Fields & Relationships section of the
Book detail page, click New.
-
Select Number for the data type and click Next.
-
Enter Price for the field label.
-
Enter 16 in the length text box.
-
Enter 2 in the decimal places text box, and click
Next.
-
Click Next to accept the default values for field-level
security.
-
Click Save.
You’ve just created a custom object called Book, and added a custom field to
that custom object. Custom objects already have some standard fields, like Name and
CreatedBy, and allow you to add other fields that are more specific to your
implementation. For this tutorial, the Price field is part of our Book object and it is
accessed by the Apex class you will write in the next step.