🎉Supercharge Your Salesforce Career with 18+ Certifications, 50+ Labs & Mock Exams. Start your FREE Trial now! 🎉

🎉Supercharge Your Salesforce Career with 18+ Certifications, 50+ Labs & Mock Exams. Start your FREE Trial now! 🎉

Salesforce Object Architecture and Relationships

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 in Salesforce 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.

Salesforce object relationships are used when there is a need to connect and organize data from different objects. Relationships help organize data and link records together, enabling efficient data management and analysis. 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.

Screen Shot 2021 09 30 at 5.31.33 pm

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).

Screen Shot 2021 09 30 at 5.33.12 pm

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:

Screen Shot 2021 09 30 at 5.34.44 pm

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.

Take that first step, enroll in our Salesforce Admin course – get personalized study plans, free mock exams, quizzes, flashcards and much more.

Sign Up and upgrade your career to the next level.

Get your Salesforce Certifications on the first go

Frequently Asked Questions (FAQs)

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.

Table of Contents

Subscribe & Get Closer to Your Salesforce Dream Career!

Get tips from accomplished Salesforce professionals delivered directly to your inbox.

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

Unsure of Your Next Step?

Take our quick 60-second assessment to discover the Salesforce career path or learning journey that’s a perfect fit for you.

Related Articles

Showcasing Your Salesforce Skills Online!

Learn how to build a standout Salesforce portfolio that showcases your skills and advances your career. Read now!

Salesforce Marketing Cloud Developer Interview Questions and Answers 2024

Preparing for your Salesforce Marketing Cloud Developer interview? Here are top 20 interview questions, in-depth answers, and tips to showcase your SFMC skills.

Essential Git Security Practices

Learn essential Git security practices to prevent leaks, safeguard your codebase, and build trust in your software. Read now!