Salesforce Data Model: Objects, Fields and Records
Most people are familiar with the term “database” when discussing data management. The structure of data storage in Salesforce is comparable, with objects, fields, and records serving as important components. Come along as we take a tour to learn how Salesforce stores and handles data.
Objects in Salesforce
Objects are just like tables in a database. They are used to store and organise data in a structured way. Salesforce offers two primary types of objects: standard and custom.
Standard Objects
Standard objects are the objects that are already provided by the salesforce. For example Account, Contact, Case and more. Navigate to the object manager to have a look at them.
Custom Objects
Custom objects are the objects created by the user tailored to the unique business requirements. For instance, envision a scenario where we wish to catalogue book information — creating a custom object named “Book” is the solution.
How to create a Custom Object?
Crafting custom objects in Salesforce is a straightforward process. Navigate to Setup > Object Manager > Create > Custom Object.
Enter the label of your object and there we have our custom object created. It's worth noting that the API Name of a custom object bears "__c" at the end, distinguishing it from standard objects.
Now that we have created the object. You might be wondering where we store the name, price, and author of the book. Well, for this purpose you have fields in Salesforce.
What are Fields?
Fields are analogous to columns in a database, representing the attributes of objects. Salesforce already provides some standard fields for both standard and custom objects. Some of them are Name, Created By, Last Modified By etc. Along with that, you can also have custom fields on both standard and custom objects. Continuing with our “Book” example, custom fields like Price and Author Name can be established to capture pertinent book details.
How to create Fields on Objects?
To create fields, Go to Setup > Object Manager > Select Object > Field and Relationships > New.
Depending on the data to be stored, users can select from various data types such as Auto Number, Number, Picklist, Date, Email, and more. Don’t worry about Relationships for now. We will be covering that later.
Records in Salesforce
Records, akin to rows in a database, encapsulate specific instances of objects along with their corresponding field values. For instance, within a custom object “Student,” a record might contain details like Student Name, Roll Number, and Email. Example Record- Student Name: Student 1, Roll Number: 101, Email: test@student1.com.
Conclusion
Together, objects, fields, and records constitute the backbone of Salesforce’s data model, empowering users to efficiently manage and track business data. Our journey into Salesforce data management has only begun to unveil its potential. Stay tuned for our upcoming exploration into Object Relationships and Junction objects, where we’ll delve deeper into Salesforce’s data capabilities through real-world business scenarios.
This blog is committed to bringing you practical insights and solutions. Share your experiences and challenges in the comments below, and let’s navigate this data journey together, learning from each other’s experiences along the way.