Blog

blog image

Know About Relationships in Salesforce

May 13, 20244 min read

“Not only are bloggers suckers for the remarkable, so are the people who read blogs.” - By delipat

Know About Relationships in Salesforce

8 Reasons

Master-detail, self-relationship, one-to-many, many-to-many, lookup, hierarchy

Salesforce is a database. It is the job of the Salesforce administrator to configure the database with objects as per business requirements. To configure objects, establishing relationships among them is important. Companies offering Salesforce Developer as a service understand the importance of creating the right relationships between objects. This article/video will give you an overview of relationships in Salesforce.

What are relationships in Salesforce?

In simple terms, a relationship is a two-way association of objects in Salesforce. The relationship between two objects or records defines how one object or record is related to another object or record in Salesforce.

What is the use of relationships? Why build relationships between objects in Salesforce?

A relationship is used to link objects in Salesforce. It helps in making connections and displaying data of other related objects. Selecting the right relationship among two objects ensures building a scalable data model.

By building relationships, users can view data of the objects related to the object they are viewing.

Before creating a relationship between two objects, it is essential to understand parent and child objects.

What are Parent objects and child objects in Salesforce?

Objects that are already created are known as Parent objects. The objects that are being created are known as Child objects.

For example, Account, contact, and opportunity are three objects in Salesforce. Here, the account is a parent object and contact and opportunity are child objects. Because, while creating contact and opportunity objects, the account object is already created.

Once you understand which is the parent and the child object, the relationship between objects can be determined effectively.

Note- Relationships are built between objects and not between fields in Salesforce.

Types of relationships in Salesforce

There are various types of relationships in Salesforce. Let us understand the types of relationships with examples.

The two main kinds of relationships in Salesforce are:

  • Lookup relationship

A relationship between objects where the child object is not dependent on the parent object is known as a Lookup relationship in Salesforce. It is a loosely linked relationship.

For example, One employee is the manager of multiple outlets. If the employee leaves the organization and his record is deleted, the record of multiple outlets is not deleted. Instead, another employee becomes the manager. Here, the outlet (child object) is not dependent on the employee (parent object).

  • Master-detail relationship

The relationship between two objects in Salesforce, where the child object is completely dependent on the parent object, is known as a master-detail relationship. It is a closely linked 

relationship. In the master-detail relationship, the parent object is known as the master, and the child object is known as the detail.

For example, the relationship between outlet (parent object) and revenue (child record) objects is a master-detail relationship. If an outlet is shut and its records are deleted, then all the revenue data of that outlet will also be deleted.

Apart from lookup and master-detail relationships, there are a few other relationships that help in convenient capturing and analyzing data in Salesforce. They are:

  • Hierarchy relationship

A hierarchy relationship is a type of lookup relationship one object has with itself. By default, a hierarchy relationship is available only in the Account object in Salesforce, and you can create a hierarchical relationship only in the User object. 

For example, In a loan management company; The company lends loans to a particular company that can be a subsidiary of another company. In such cases, a hierarchy relationship is helpful.

  • One to many relationships

The relationship, where one record of the parent object can be related to many records of the child object, is known as a one-to-many relationship. 

For example, the relationship between outlet to revenue object and head office to outlet object is that of a one-to-many relationship. It is because one outlet can have many revenues in the same way as one head office can have many outlets.

  • Many to Many relationships

The relationship, where one record of an object can be related to many records of another object and vice versa, is known as a many-to-many relationship. To create many-to-many relationships in Salesforce we need to create a junction object.

For example, the standard objects lead and the campaign is in a many-to-many relationship. Multiple leads can be generated from a single campaign, and a single lead can be a part of multiple campaigns.

  • Self-relationship

The relationship one object has with itself is known as self-relationship. 
For example, you form a new campaign, but the new campaign is a part of an older campaign. In such cases, you can build self-relationships between the same object. Relationships are a cornerstone in Salesforce, and
Salesforce developers as a service are instrumental in optimizing these relationships. Their expertise empowers businesses to forge stronger connections with their customers, streamline operations, and achieve their sales and service goals. Leveraging Salesforce’s robust relationship management capabilities is a strategic advantage in today’s competitive landscape, enabling companies to efficiently manage data, nurture valuable connections, and deliver exceptional customer experiences.

Back to Blog

Delipat IT is a leading provider of innovative Salesforce implementation and consultation services for businesses of all sizes. With a strong focus on delivering tailored services, Delipat IT has earned a reputation for excellence in the industry.

Menu

Design & Developed By Delipat

Contact Info

  • 2nd floor, Phase 2, Webel IT PARK, Palashdiha, Industrial Area, Durgapur, West Bengal 713208

© Copyright 2024 Delipat