Custom & Standard Objects in Salesforce

Introduction

Salesforce Objects can be considered as the building blocks of the Salesforce CRM platform. So, what exactly is a Salesforce Object? A Salesforce Object is comparable to a spreadsheet table with multiple rows and columns. Each Salesforce Object represents a table in a spreadsheet.

Example:

A restaurant chain tracks its various chains using a spreadsheet. The columns include information such as location, manager, phone number, and so on, while the rows store information for each chain. This is what the spreadsheet looks like:

But spreadsheets can be a hassle and seem cluttered and confusing to the human eye.

So what do we do?

Let’s harness the power of Salesforce Objects to get past this hurdle.

In Salesforce, these spreadsheet tables are referred to as objects. The columns are called Fields, and the rows are called Records.

By bringing in the data model, Salesforce makes our life a whole lot easier. So what is a data model?

A data model makes it possible to model databases in a way that makes sense to us humans.

Essentially, a data model refers to an app’s collection of objects and fields.

This is what a record ( a row) from the above spreadsheet would look like if we model it using Salesforce:

Isn’t this so much more appealing and easier to understand?

We can even find related objects and information too from an Object! Isn’t this better than a couple of spreadsheets crammed with information that we can never seem to find on time?

Now, let’s learn more about Objects and build our very own data model.

Basics of Salesforce Objects

Salesforce supports a couple of types of objects – Standard Objects, Custom Objects, External Objects, and BigObjects, but we’ll be looking at the most prevalent types of objects – Standard and Custom Objects.

Standard Objects

These are objects that are included in the Salesforce platform by default. You may have come across – Leads, Opportunities, Accounts, and Contacts – these are a few of the standard objects included in Salesforce.

Custom Objects

These are objects created by us to store information that is unique and important to our business.

For example, we saw the Custom Object Chain that is used to store information about the various chains run by a restaurant business.

Steps to Create a Custom Object

Now let’s get hands-on and create a Custom Object. Follow along!

1. Open your trailhead playground.

2. Click the gear icon ( ) on the top-right corner of the page and launch Setup.

3. Click on the Object Manager tab.

Graphical user interface, application
Description automatically generated

4. Click on Create and select Custom Object.

Graphical user interface, application
Description automatically generated

5. For Label, enter Chain, and for Plural Label, enter Chains. (The Object Name and Record Name fields are auto-filled)

6. Leave the rest of the fields as it is. Make sure you select the checkbox  Launch New Custom Tab Wizard after saving this custom object at the very bottom of the page. (This step makes it possible to launch the custom tab wizard for the object so that your users can access the tab asap without an extra step to set it up). It should look like the image given below.

Graphical user interface, text, application, email
Description automatically generated

7. Click Save.

8. On the New Custom Object Tab page, click on Tab Style and select a style of your choice.

9. Click Next, Next, and Save!

Way to go! You just created your first Custom Object on the Salesforce Platform. That was quite easy, wasn’t it? Now that we created a custom object, we’ll need to add fields (a.k.a columns) to the object. Let’s get started on that.

Types of Fields in Salesforce Objects

Before we rush into adding fields to the object, let’s get acquainted with the different types of fields available on Salesforce.

Table
Description automatically generated

Steps to Create a Custom Field

Follow the steps given below to create a custom field, Manager for our Chain Object to save the name of the Manger running the Chain.

1. Open your trailhead playground.

2. Click the gear icon ( ) on the top-right corner of the page and launch Setup.

3. Click on the Object Manager tab and find the Object, Chain from the list and select it.

Graphical user interface, application
Description automatically generated

4. From the sidebar, click on Fields & Relationships.

5. Click New on the top-right corner.

Graphical user interface, application
Description automatically generated

6. For Field T type, select the checkbox next to Text.

7. Click Next.

Graphical user interface, text, application, email
Description automatically generated

8. Enter the following:
Field Label – Manager
Field Length – 30
( Check any boxes as per your requirement, the Field Name is auto-filled)

9. Click Next.

Graphical user interface, text, application, email
Description automatically generated

10. Click Next again, and then Save.

Way to go! You just created a custom field for the Chain Object.

You may have noticed that Field Name for the object we just created ends with __c, this simply means that this particular field is a custom field.

Steps to Create a Record

We created a Custom Object with a Custom Field. The next obvious step we’ve all been waiting for is to create a record of the Chain object. Let’s get started!

1. Once on your Trailhead Playground, click on the App Launcher ( )on the top left corner.

2. Select Sales.

3. Click on the Chains tab in the navigation bar, if you don’t see it, simply expand the dropdown menu More to find the tab

Graphical user interface, text, application, email
Description automatically generated

4. Click New on the top-right corner.

5. Enter the details for the Chain ( you can add more fields like I’ve done here by creating new custom fields), and click Save.

Graphical user interface, application
Description automatically generated

And that’s it! Quite interesting and fu, to say the least! Now you can experiment and learn more on your own by creating new Objects, Fields and Records.

Best practices for Customization

Here are a few points to keep in mind before customizing your org.

  • Ensure you’re not bringing in any redundant objects or fields.
  • Test in your Sandbox before deploying in your Production org.
  • To avoid confusion in your organization, name the custom fields and objects appropriately.
  • Make the lives of your users easier by including a description. It may be tempting to skip descriptions by assuming the name says it all, but that might not be the case always, ensure to fill in a description to avoid any confusion.
  • If you want to ensure that your users don’t skip out on filling a particular field, make those fields Required either during the creation of the field or later on from the Object Manager tab in setup.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.