Create a Custom Object in Salesforce

Data is really crucial for everything, whether it is a business, an organization, or anything else, and we must be quite careful when managing it. We have a variety of methods for storing data on different platforms, such as tables, spreadsheets, and so on. In salesforce, “Objects” are used to store data.

If we compare objects to SQL tables:

  • Table => Object
  • Row => Record
  • Column => Field

Types of Objects in Salesforce:

Salesforce supports different objects such as standard objects, custom objects, external objects, platform events, and BigObjects. In this article, we are going to know about two objects. They are Standard and Custom Objects. 

Standard objects:

The objects which are pre-built with salesforce are called standard objects. In salesforce, there are approximately 399 standard objects. The following are a few standard objects:

  • Accounts
  • Contacts
  • Opportunities
  • Leads, products
  • Campaigns
  • Cases
  • Users
  • Contracts
  • Report
  • Dashboards, etc.

Custom Objects:

The objects that we create ourselves to meet our business needs are called Custom Objects. By navigating to the following path, we can see the list of Standard and Custom objects in Object Manager. 

Login -> Click on gear Icon -> setup -> Object Manager

Object Manager:

The Object Manager is a single location where we can manage all of our org’s Objects. We can access the list of objects and create new ones.

Let’s assume we’re managing the data of MobileCart, which is a cell phone retailer. For this, we are supposed to create an object for storing the product data. Our Object name will be “Product”.

Steps to Create a Custom Object in Salesforce

1. Login into the salesforce org

2. Setup can be started by clicking the gear icon at the top of the page.

Create a Custom Object in Salesforce

3. Click on the Object Manager tab

Home Salesforc 2
Object Manager

4. Click on Create option and select the Custom Object in the top-right corner

Object Manager

5. In the Label field, we must fill the name of the object. After entering the Label field, the Object Name and Record Name fields are auto-fill.

For the Plural Label field, We can add “s” to the object name, i.e. Products. In tabs, the Plural label names are actually used.

New Custom Objec

When we fill in the label name, the Record name will be auto-filled; by default, it will be filled by appending the name to the object name. For example, the Product Record Name is “Product Name”. When using the API, the Record Name field is always referred to as “Name.”

We have two different data types here: Text and Auto number. If we choose Text, the format will be text, and if we choose an Auto number, an auto-generated number will be created for each record. We can change the format of the auto number. It will be used more than text.

New Custom Objec 1 1

If we choose Auto Number, we must fill up the two entries Display Format and Starting Number

New Custom Objec 2

Display Format: we can customize the appearance of the Auto Number field with a Display Format.

  • {000} => 001
  • PO# {00000000} => PO# 00000001
  • {YYYY}{MM}-{0} => 202111-1

Starting Number: We must specify the number from which the auto-incrementing will begin.

6. After completing the required fields, go to the bottom of the page and click the box to  Launch New Custom Tab Wizard after saving this custom object.

If we select this option the new tab will be created on the Tab bar and we can give the tab styles to our tab. We will see on Step 8.

New Custom Objec 3

7. Save with the default values for the rest of the options.

8. After clicking the save button, we are given an option to give our custom object tab styles.

Tabs Salesforc

Once you’ve given the appropriate styles to the tab, move on to the next step.

9. In this step we need to add the profiles to the tab. To decide which profiles get access to the visibility of this tab.

For tab visibility, we have three different types of custom options.

  1. Default On: The Tab will be visible on the Tab Bar
  2. Default Off: Tab will not be visible on the Tab bar, But it will be visible in “All Tabs” ( + Symbol in Classic or Old , Pen sign in Lighting or new Salesforce)
  3. Tab Hidden: Neither this Tab will be visible in Tab bar nor in All Tabs . For selected profiles only it will be visible.
Tabs Salesforc 1

10. After clicking on the Next button, we need to Choose which custom applications will have access to the new custom tab. From the detail and edit pages of each Custom App, we can change the visibility of tabs.

Tabs Salesforc 2

11. After that, click the save button to create the custom object.

Product Salesf

By following these steps we can create the custom object. We can modify the object to meet our needs and can destroy it if we don’t want to utilize it.

Thanks for the reading … 🙂

Leave a Comment