Prerequisites:
A Salesforce account
in a sandbox Performance, Unlimited, or Enterprise Edition organization,
or an account in a Developer organization.
For more information
about creating a sandbox organization,
see “Sandbox Overview” in the Salesforce online
help. To sign up for a free Developer organization, see the Developer Edition Environment Sign Up Page.
In this step, you create a custom object called Book with
one custom field called Price.
- Log into your sandbox or
Developer organization.
- 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.