How to Create Master Detail Relationship in Salesforce

Salesforce relationships actually represent associating one kind of objects with another object.

These relationships are very helpful and there are three basic relationship types:

– Master-detail – Many-to-many – Lookup Master-Detail is a relationship in which the master or parent object always controls certain behaviors and attributes of the child object. For example, when a data of the master, or let’s call it simply parent object, is completely deleted, its related detail records will be deleted as well. That’s why master-detail relationship is actually a parent-child relationship. For instance, you can define a master-detail relationship that consists of two objects, such as Account—BudgetReport. Furthermore, this report extends the relationship to sub-detail records, such as Account—BudgetReport—Expense Line Item.

Using this type of relationship users can then perform operations across the master—child—sub-child relationship. (Exp: Job application – Review – Detail).

 

How to Turn Re-Parenting Option On

In this relationship Master represents the Parent and detail represents the Child. Usually records can’t be reparented in a typical master-detail relationship. When you create your master-detail relationship, you’ll notice a checkbox — on when you’re creating that master-detail lookup relationship — to allow re-parenting.’ If allow re-parenting’ option is checked, you can freely move data and records from one report to another report. To learn how to create master detail relationship in salesforce, follow the tips below. This type of relationship works with latest Salesforce editions. If you are unsure, you can learn how to check Salesforce edition. By following these tips, you’ll learn how to create master detail relationship in Salesforce. Actually, you’ll discover new ways of customizing your Salesforce package for a maximum benefit. Learning how to create master-detail relationship is not easy, but if you have some basic knowledge on how Salesforce works, you will find it very easy to create this type of Salesforce relationship.

 

How to Create Master Detail Relationship in Salesforce

In the first place remember that if you have two custom interest objects and members, you will not be able to start creating a master-detail relationship from scratch.

The best way is to make the child-member-object as your interest-object, so that each of the two members can have multiple interests. Then, proceed to locating interest-object and then locate the custom fields section. In the Custom Field section, click the “New” button. Then, a new page called Interest new relationship will appear. Enter the label and name for your lookup fields. Keep in mind that the fields should be viewable to all in all lookup fields. Click the Save button. Finally, visit the objects in Salesforce and check if the new master-detail relationship has been successfully created. By following these tips you’ll learn how to create master detail relationship in Salesforce.  

What if data already exists in a child object?

In a case that records already exist in an existing custom object, you’ll need to delete all the records from the object which is going to be the child record. Then, create the master-detail relationship. Otherwise, create a lookup relationship. Map all the child records to their respective parent records. Then, change lookup to master-detail relationship. Just keep reading Salesforce training material and you’ll understand more and more how Salesforce platform works. If you are unsure, feel free to contact salesforce help desk for more information.

mm
Amanda is the Lead Author & Editor of Rainforce Blog. Amanda established the Rainforce blog to create a source for news and discussion about some of the issues, challenges, news, and ideas relating to Salesforce usage.