Salesforce Apex Tutorial – Chapter 3: Apex Examples
Here we will use the Developer Edition Environment of salesforce and In this example, we will discuss object and field creation in Salesforce and how to use them in code for implementing business logic.
You can read Salesforce Apex Tutorial – Chapter 2: Apex Environment and the next article Salesforce Apex Tutorial – Chapter 4: Data Types In Apex.
Below are the steps to create objects and fields in salesforce.
Step 1: Go to Setup click object manager and then click on Create button, select custom object to create custom object an as shown in below images
Step 2: After clicking on create object a form will appear where you can fill in the details of the object and click save.
Step 3: Once you created the object now it’s time to create fields. To create fields click on fields and relationships from the side pan, a new page will appear with several buttons like New, Deleted field click on New as shown in below image.
Step 4: After clicking on the New button a new page will appear with a list of data types from which you can select the data type for the field you want to create.
Step 5: Enter the Information of the field and click Next as shown in the below screenshot.
Step 6: Click on the Visible check box and the Next as shown in the below screenshot.
Step 7: Click on Save or Save and New for creating more fields.