Friday, July 29, 2016

Data Modelling :Creating object relationship

Note: All credit goes to Salesforce, I am just a developer who enjoy playing trailhead and try to make note to myself.

Types of Object Relationship


  1. Lookup
    • relationship that links one object to another object.
    • can be used to create 1:1 or 1:M relationship
  2. Master Detail
    • parent:child relationship.
    • master record controls certain behavior of the details or subdetail record.
    • ownership and sharing is determined by master record.
    • when master record is deleted,the detail also will be deleted along with it.
    • master detail relationship always required on detail record.
    • use for tight binding between two objects
    • master object can also contain rollup summary field.

Differences between Lookup and Master detail relationships


  1. Master detail relationship
    • cannot create detail without master
    • detail is also deleted when master is deleted
    • the sharing rules is inherited from the master record
    • number of master detail relationships are limited based on platform edition and licence
    • can't set profile object permission for a detail record.The details record inherits permissions from the master record
    • master-detail relationship are automatically included in  report record types
  2. Lookup relationship
    • to reference commonly shared data, such as reference data
    • to relate multiple parent records to the child record
    • to link two objects together when you don't want the behavior of the master-detail relationships such as sharing rules,profile permission and cascade delete.
    • if the details object has its own tab, then look up is the choice. 


Source:Creating object relationship

No comments:

Post a Comment