function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
ashokdddashokddd 

when will we take lookup and master detail relationship??

pconpcon
Can you please ellaborate?  Do you mean why should you use a lookup vs why you should use a master-detail relationship?
Virendra ChouhanVirendra Chouhan
Hi Ashok

There is many reason to use Master detail (MD) and also to use LookUp --
  1. If you need RollUp summary then use MD
  2. If you need cascade delete then use MD
  3. If you want parent field required in child record then use MD
  4. If you want only one Owner of both parent and Child then use MD. ( Because in MD child have no Owner filed )
  5. If you need to use same sharing rules in both object Because child has inherit from parent. 
  6. If you need that without parent detail record is never being created.
Now why LookUp
  1. If you don't need cascade delete.
  2. Lookups are generally for use where you may or may need to have a relationship between two objects (but not always).
  3. Lookups are generally used to reference commonly shared data, such as reference data.
  4. Lookups are used to link two objects together when you don't want the behaviour of the master-detail - particularly around sharing rules, profile permissions and cascade delete.
Regards
Virendra