Relationship in Salesforce

What is Relationship in Salesforce?

In Salesforce, a relationship is a two-way link between two objects. We can use relationships to bind items together, as well as to build connections and display data about connected objects.

Different types of relationships in Salesforce: -

1. Lookup Relationships
2. Master-Detail Relationship
3. Many-to-Many Relationships
4. Self-Relationship

But Basically, We Are Used Two Relationship In Salesforce That Is: -

1. Lookup Relationships

2. Master-Detail Relationship

Lookup Relationships:

Both objects are weakly connected in this case, which implies that if one is destroyed, the other will not be deleted.

The behavior of the Look-Up relationship:

Some important points to remember:

When a child record is deleted and then restored from the recycle bin, the master-detail relationship is lost at the time of deletion and is not restored once the child/detail is restored. We can convert a master-detail to a look-up if the lookup field in all records has a value, and we can convert a look-up to a master detail if there is no roll-up summary field available.

How to create Lookup Relationships in Salesforce

Master-Detail Relationship

In this type of relationship, one object acts as a master and the other acts as a detail object. In other words, this relationship is similar to that of a parent and a child. When we want two objects to be strongly tied or dependent on each other, we utilize this form of relationship.

The behavior of Master-Detail relationship:

How to create Master-Detail relationship in Salesforce

Reference: https://medium.com/@snehadaf02?p=9f7dab7b2cdf

Add a Comment

Your email address will not be published. Required fields are marked *