Salesforce provides standard objects like Account, Contact, Lead, Opportunity, and Case to manage business data.
But every business has different requirements. Sometimes the standard objects are not enough to store all the information your company needs.
In that situation, Salesforce allows us to create Custom Objects and Custom Fields.
Custom Objects help us create our own database tables in Salesforce, while Custom Fields help us store additional information inside those objects.
While integrating Salesforce CRM for our client, a chain of hospitals, we had to create objects to store data for various hospital entities, including patients, departments, and doctors. We created custom objects according to the requirements.
Here, I will explain the standard and how to create custom objects and fields in Salesforce.
What are Objects in Salesforce?
In Salesforce, an object is a database table that stores data specific to your company. Objects are essential to Salesforce data, as they enable us to set up and manage our data effectively.
There are two types of objects in Salesforce:
1. Standard Objects in Salesforce.
A standard object in Salesforce is a pre-built object provided by Salesforce. Standard objects have been created to manage business data.
The following are some examples of standard objects in Salesforce:
- Account: This object allows us to store information about companies or organizations.
- Contact: In the contact object, we can store and manage information about individuals associated with your business accounts
- Campaign: Here, we can store campaign data.
- Leads: Potential customers generated through the campaign.
- Case: The case object can store customer issues.
2. Custom Object in Salesforce.
We can create custom objects in Salesforce to store business-specific information. These custom objects enable you to store data unique to your organization. We can also add custom objects to the standard and custom apps.
When we create a custom object, its API Name will appear as ObjectName_c. This _c refers to the custom app or objects. We can create custom fields in the objects.
What is a Custom Field in Salesforce?
A Custom Field is a field created by users to store additional information. Salesforce provides standard fields like:
- Name
- Created Date
- Owner
But businesses usually need more fields. For example:
- Student Email
- Employee Salary
- Joining Date
- Course Duration
Custom fields also end with __c.
Example:
- Salary__c
- Joining_Date__c
- Student_Email__c
Types of Custom Fields in Salesforce
Salesforce provides many field types. The most commonly used are:
| Field Type | Purpose |
|---|---|
| Text | Store text values |
| Number | Store numeric values |
| Date | Store dates |
| Checkbox | True/False values |
| Store email addresses | |
| Phone | Store phone numbers |
| Picklist | Dropdown values |
| Currency | Store money values |
| Long Text Area | Store large text |
| Lookup Relationship | Connect objects |
| Master-Detail Relationship | Parent-child relationship |
Create Custom Objects and Fields in Salesforce
First, I will explain how to create a custom object in Salesforce. Then, based on the requirements, we will create and add custom fields to the object.
How to Create a Custom Object in Salesforce
As discussed in the requirements, we will now create custom patient objects to store patient records. To create a custom object in Salesforce, follow the steps below.
- Go to the Setup page in Salesforce Lightning.
- Click the Object Manager tab.
- Click the Create dropdown and select Custom Object.
- Now the New Custom Object page will open, where you can configure the custom object’s details, such as Label, Object Name, and Record Name.

- After that, the New Custom Object page will open. Here, enter the following details:
- Label: Enter the name of the custom object that will appear in the Salesforce user interface.
- Plural Label: Enter the plural form of the object label. Salesforce uses this name for tabs and related lists.
- Object Name: The API name of the custom object used internally in Salesforce. It is automatically populated based on the Label field.
- Description: Optionally, add a description to explain the purpose of the custom object. This helps administrators and developers understand the object functionality.

- As you scroll down, you will see the Record Name field. Here, you can define the primary field name for the custom object records based on your business requirements.
- Next, select the Data Type for the Record Name field. Salesforce provides two options:
- Text: Allows users to manually enter the record name.
- Auto Number: Automatically generates a unique record number using a defined format, such as STU-{0000}.
- Below that, you will find the Optional Features section. If you want to create reports for this custom object, enable the Allow Reports option.
- You can also enable other features, such as Allow Activities, Track Field History, and Allow Search, based on your requirements.

- Then, the Deployment Status must be ‘Deployed’; otherwise, you cannot use this object. You can use the allow search feature to add notes and attachments to the object UI.
- If you want to add this object to the app, check the Launch New Custom Tab Wizard option. Then, click the Save button.

- When you click the save button, you will be redirected to the New Custom Object Tab page.
- Here, you need to select the Object we created and the Tab Style by clicking on the lookup icon. Then, click on the Next button.

- Here, you will see the App list in the Salesforce org, and you need to select which app you want to add this object.

- To verify that the custom object and its tab were created successfully, open the App Launcher and navigate to the Salesforce app where you added the object.
- There, you will see the newly created custom object tab in the navigation bar, confirming that the custom object has been added successfully to the app.

This is how we can create and add custom objects to Salesforce’s app.
How to Create Custom Fields in Salesforce
Per the business requirements, we may need to create a custom field for standard or custom Salesforce objects.
To create a custom field in Salesforce, navigate to Salesforce’s setup page and follow the steps below.
- Go to the Setup and click on the Object Manager tab.
- Select the custom or standard object in which you have to create a custom field.
- In this example, I have selected the Account object.

- In the object setup window, click on the Fields and Relationships; in the next window, click the New button.

- Select the field type and click on the New button.

- Enter the Field Label and Field Name. To make the field required (mandatory), activate the Required checkbox. After this, click on the Next button.

- To establish field-level security, select the profiles that can access the field, then click Next.

- Select the page layouts that should include this field. This field will be visible only on the selected page layouts.
- After selecting the page layouts, click Save.

When we click Save, the custom field will be created in the selected Salesforce object and appear in the object’s Fields and Relationships.
The field will also be visible on the object’s record page layout.
To know more about firlds in Salesforce read article: Standard and Custom Fields in Salesforce.
This way, we can create a custom field in Salesforce, whether in a custom or standard object.
How to Change the Custom Field Type in Salesforce
In Salesforce, we can also modify the data type of a custom field. For example, you can change a field from Text to Text Area Long.
- To change the custom field type, click on the Object Manager tab -> Select the object with the custom field -> Fields and Relationships, -> select the custom field.
- Click on the dropdown arrow of the custom field and select Edit.

- Click the Change Field Type button.

- Select the new field type and click on the Next button.

- Here, we can also change the field label and change the field from text to a long text area.
- After this, click on the Save button.

When we click the Save button, the custom field type changes from text to long text.

This way, we can change the custom field type in Salesforce using the steps above.
Best Practices While Creating Custom Objects and Fields
- Use Meaningful Names
- Good:
- Student Email
- Joining Date
- Bad:
- Field1
- Data123
- Good:
- Avoid Creating Unnecessary Fields
- Too many fields create confusion.
- Only create fields that are actually required.
- Use Correct Field Types
- Use:
- Email field for emails
- Phone field for phone numbers
- Date field for dates
- This improves validation and reporting.
- Use:
- Add Help Text
- Help text helps users understand fields.
- Example: “Enter student joining date.”
- Use Picklists Carefully
- Do not create too many picklist values.
- Keep dropdown values clean and meaningful.
Common Mistakes Beginners Make
- Creating Wrong Field Type
- Example: Using Text instead of Date.
- This creates reporting problems later.
- Not Setting Field-Level Security
- Users may not see fields if visibility is incorrect.
- Creating Duplicate Fields
- Example:
- Student Email
- Email ID
- Email Address
- Avoid duplicate information.
- Example:
Important Interview Questions
What is a Custom Object?
A custom object is a user-created object used to store business-specific data.
What is a Custom Field?
A custom field is a user-created field used to store additional information in an object.
What is the difference between Lookup and Master-Detail?
A lookup is a loose relationship, while a master-detail is a strong parent-child relationship.
Final Thoughts
Custom Objects and Custom Fields are among the most important features in Salesforce. They allow businesses to customize Salesforce according to their needs without complex coding.
Once you understand how to create objects and fields, you can start building complete business applications in Salesforce Lightning.
We also explored the need for a custom object in Salesforce, and I demonstrated how to create one and add it to the app, with examples and step-by-step instructions.
You may like to read:
- Create a Custom App in Salesforce
- Create a Free Salesforce Developer org
- Create Quick Actions in Salesforce
- Disable Apps at Profile Level in Salesforce [2 ways]
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.