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
AbAb 

using lookup instead of Master detail

Hello,

I am duplicating few objects, Ideally i wanted to have a detail object with two masters, but as it is not possible , I am obliged to make one of them as lookups..

What effects do the usage of lookup instead of masterdetail, will have on below things
1) Related lists in pagelayouts
2) I wanted to copy the records from one object to other using Apex
Best Answer chosen by Ab
Amit Chaudhary 8Amit Chaudhary 8

The key difference is master-detail has a direct dependency between the objects:
  • You cannot have a detail record without a master.
  • The detail record inherits sharing rules from the master.
  • You cannot update the relationship to the master in a master-detail relationship.
  • The number of master-detail relationships you can use are limited.
  • You cannot set profile object permissions for a detail record
  • Master-detail relationships are automatically included in report record types 
 
 When you delete the master it will cascade delete all detail records relating to that master. A typical use of a Master-Detail would be the classic Sales Order and Sales Order Items objects.
  • Lookups are generally for use where you may or may need to have a relationship between two objects (but not always).
  • Lookups are generally used to reference commonly shared data, such as reference data.
  • 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.
  • Lookups are used when you need to relate multiple 'parents' to the detail record 
Please check below post for more information

https://developer.salesforce.com/forums/?id=906F0000000ML7zIAG
http://www.infallibletechie.com/2013/02/difference-between-lookup-and-master.html
https://developer.salesforce.com/forums/?id=906F0000000BXZBIA4

 

All Answers

Panduranga GollaPanduranga Golla
Once you lookup field ,it is not mandatory value for the object ,master field  value is mandatory.
R Z KhanR Z Khan
What do you mean its not possible? Sound like you need a junction object. more info below
https://help.salesforce.com/HTViewHelpDoc?id=relationships_manytomany.htm
gyani19901.3956550919266765E12gyani19901.3956550919266765E12
Hi Sandrine,
You can convert master detail into lookup and the changes made in lookup field you have no neccessary to field the mater record and when you delete the master records then the child record remain same.

Thanks
Gyanender Singh
http://www.mirketa.com
Amit Chaudhary 8Amit Chaudhary 8

The key difference is master-detail has a direct dependency between the objects:
  • You cannot have a detail record without a master.
  • The detail record inherits sharing rules from the master.
  • You cannot update the relationship to the master in a master-detail relationship.
  • The number of master-detail relationships you can use are limited.
  • You cannot set profile object permissions for a detail record
  • Master-detail relationships are automatically included in report record types 
 
 When you delete the master it will cascade delete all detail records relating to that master. A typical use of a Master-Detail would be the classic Sales Order and Sales Order Items objects.
  • Lookups are generally for use where you may or may need to have a relationship between two objects (but not always).
  • Lookups are generally used to reference commonly shared data, such as reference data.
  • 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.
  • Lookups are used when you need to relate multiple 'parents' to the detail record 
Please check below post for more information

https://developer.salesforce.com/forums/?id=906F0000000ML7zIAG
http://www.infallibletechie.com/2013/02/difference-between-lookup-and-master.html
https://developer.salesforce.com/forums/?id=906F0000000BXZBIA4

 
This was selected as the best answer