SaasGuru Logo

Salesforce Object Architecture and Relationships

Table of Contents

Have you ever wondered how Salesforce manages to accomplish so much in very little time? Well, the secret lies in its architecture and object relationships. So, What are Object Relationships in Salesforce?

An object relationship is a two-way association between two objects established using custom relationship fields on the objects. This is used when users want to access records, along with related data. There are various types of relationships available in Salesforce, and you must decide on the kind of relationship that suits your requirements.

Now, let us check how Object Architecture and Relationships in Salesforce work wonders. 

Salesforce Objects

A database is a collection of structured information modelled in rows and columns in a series of tables to make processing and data querying efficient. If you’re not familiar with databases, think about storing data in a spreadsheet.

Unlike relational databases that store data in rows and columns, the Salesforce Platform uses objects to store data with tables as objects, columns as fields, and rows as records.

Objects, in a nutshell, are containers for your information, with additional enhancements that make them more powerful. For example, when you create a custom object, the platform automatically builds things like the page layout for the user interface.

Salesforce Object Architecture and Relationships

Objects

There are two types of objects:

Standard Objects: These are objects included with Salesforce, and access will be dependent on the type of license you purchase, for example,

  • Sales Cloud License: Accounts, Leads, Opportunity, Campaigns, Quotes, etc.
  • Service Cloud License: Accounts, Cases, Knowledge, Entitlements, etc.

They are represented using standard object API names like Account, Contact.

Custom Objects: You create new objects to capture information specific to your business processes and requirements. They are represented using __c annotation like Test_Drive__c.

Fields

Fields in Salesforce are a representation of columns in relational databases. It can store different types of data values as per the business requirement.

Similar to objects, there are two types of fields:

Standard Fields: Each standard object comes with a standard set of prebuilt fields. There are limited customization options with standard fields, and users cannot delete them from the system.

Custom Fields: Every business has a unique set of requirements and data points to track information. You can create custom fields on standard or custom objects. A user can use custom fields to capture the information that is not covered by standard fields.

Here are some of the key takeaways on the fields.

Object Relationships

As we have discussed earlier, an object relationship is a two-way association between two objects established using custom relationship fields on the objects. This is used when users want to access records, along with related data. For Example, Auto Car is an automobile company that sells cars through dealerships. Users can view all the test drive records (child) from the customer account record (parent).

Looking through the most used four types of relationships in Salesforce:

Lookup Relationship: A loosely coupled relationship essentially links two objects together to “lookup” one object from the related items on another object.

Master-Detail Relationship: It is a strongly coupled relationship. In this type of relationship, one object is the master, and another is the detail. The master object controls certain behaviours of the detail object, like who can view the detail’s data.

Below are the key differences between the two important and most used relationships:

Many-to-Many Relationships: Also known as Junction Objects, this relationship allows each record of a single object to be linked to multiple records of other objects and vice versa. They are created using a custom object and then relating two other objects via two master-detail relationships.

Hierarchical Relationships: This unique relationship can only be used on the user object and is designed to create a hierarchy of users. For example, it could be used to create a lookup field for the user object, which can be used to list the user’s expense approver.

Summary

Objects Architecture and Relationships are a core part of Salesforce data modelling. Hopefully, this article gave you a good understanding of the objects, fields, and relationships and how to use them in your implementation.

Are you interested to learn further about Salesforce and its features? Explore our Salesforce Certification Programs. Sign Up and upgrade your career to the next level.

Get your Salesforce Certifications on the first go

FAQ

1. What are some of the object relationship types available in Salesforce?

Here are the most used four types of relationships in Salesforce:

a. Lookup Relationship: A loosely coupled relationship essentially links two objects together to “lookup” one object from the related items on another object.
b. Master-Detail Relationship: It is a strongly coupled relationship. In this type of relationship, one object is the master, and another is the detail. The master object controls certain behaviours of the detail object, like who can view the detail’s data.

Key differences between two important and most used relationships:

Object Relationships in Salesforce

c. Many-to-Many Relationships: Also known as Junction Objects, this relationship allows each record of a single object to be linked to multiple records of other objects and vice versa. They are created using a custom object and then relating two other objects via two master-detail relationships.
d. Hierarchical Relationships: This unique relationship can only be used on the user object and is designed to create a hierarchy of users. For example, it could be used to create a lookup field for the user object, which can be used to list the user’s expense approver.

2. How do you find object relationships in Salesforce?

Schema Builder is a tool that lets you visualize and edit your data model. Users can graphically view, identify and document all relationships to and from a specific object with the help of Schema Builder.

Here are the steps to find Related Objects in Schema Builder-

1. Type your affected record’s object name in the schema builder’s ‘Quick Find..’ search box. Ensure the result returned in the section below is checked, so it’s visible. Then, hover over the entry in the results, and you should see a magnifying glass appear to locate your object on the canvas easily.

2. Once you have located your object, clear its name from the ‘Quick Find…’ so you can see the entire list of all objects and then click the ‘Select All’ link to expose all Salesforce objects in the builder. Click, hold, and drag your object to its own blank space on the canvas so you can easily view all of the object relationship lines.

3. Once you have a good view of the relationships, hover your mouse over each line and copy down the object relationship information provided to identify all of the corresponding lookup or master-detail relationships pointing from other objects to the affected record’s object.

Looking for Career Upgrade?

Book a free counselling session with our Course Advisor.

By providing your contact details, you agree to our Terms of use & Privacy Policy

Related Articles

saasguru is Scaling Up with New Seed Funds of 4 Million AUD

saasguru has successfully raised a whopping amount of AUD 4 million in the second seed funding round led by Square Peg Capital on November 29, 2022. Read more.

How To Transition Into a Cloud Career Without Experience?

Explore ways to get a job in cloud computing without prior experience and how to use your certification to get a job in the cloud. Read now!

AWS Certification Types and Their Costs in India 2023

AWS certifications are divided into 4 tiers – the first being entry-level & the 4th being the most advanced. Explore AWS certifications & their costs in India here.

Scroll to Top