Custom Object in Salesforce
Salesforce stores data in databases. And objects are tables in databases where a business user can capture customer data. Salesforce consists of two main types of objects called standard objects and custom objects. Standard objects are the objects provided by default in Salesforce like lead, contact, account, opportunity etc.
What are custom objects in Salesforce?
Custom objects are the objects created by Salesforce admin which are unique to a particular business. They hold your customer data that cannot be stored in any standard object. Example: outlet details, student details etc.
Note- Standard objects must be the first priority. If a standard object can be adapted, such that it suits your business needs, avoid creating custom objects. Salesforce updates its platform thrice a year to improve its functionality without breaking standard objects. Always take utmost care while creating custom objects.
Before creating custom objects, a salesforce admin or business analyst must gather information about the requirements of a business.
Requirements for creating a custom object
To create custom objects, you need to beforehand understand and define two things- Fields and their Data types.
Understanding the fields to be created
An object consists of fields. These fields hold the data. One custom object may have many fields depending on the requirement.
For example, a custom object Outlet will have fields like Outlet Name, Outlet ID, Area, Sitting Capacity, Menu, Opening Time, Closing time etc.
Data type of each field
You must define the fields to be created and the data type of each field before creating custom objects.
For example, The field NAME holds the name of the person. The data type of this field is text. The field ID holds the identity number of a person. The data type of this field is an auto number because it is generated automatically.
Data are two types- Static and Dynamic. The static data remains the same, while the data in the dynamic field changes based on the requirement.
For example, the field NAME holds static data that will not change. While the field REVENUE OF THE MONTH holds dynamic data that keeps changing every month.
Should you create a field or an object?
Many admins get confused about whether to create a field or an object for the business requirement. The solution is simple. If the data stays static over time, a field must be created for it. If the data must be updated regularly or requires data capture frequently, an object must be created for it.
Therefore, an admin or business analyst must thoroughly understand the business requirement before creating new custom objects for them. They must also understand the use of the data collected in future. It gives them a better understanding as to what fields and objects must be created.
Below is a requirement analysis for a custom object. It is for a food company having multiple outlets across the world. It will give you an understanding of what data you must collect before creating custom objects.
Hope this article/video gave you a clear picture of custom objects and the requirements to create a custom object. In the next article/video, we will discuss how to create custom objects in Salesforce.