Wednesday 19 August 2015

Explain about relationships in salesforce?

We have mainly two types of relationships
1. Lookup relationship
2. Master detail relationship

1. Lookup relationship:-


  1. Up to 25 allowed per object
  2. parent is not a required field
  3. No impact on security and access
  4. No impact on deletion of parent 



2. Master detail relationship:-


  1. Master Detail relationship is nothing but Parent child relationship. 
  2. Master represents Parent and detail represents Child. 
  3. If Parent is deleted then Child also gets deleted. 
  4. Rollup summary fields can only be created on Master records which will calculate the SUM, AVG, MIN of the Child records. Up to 2 allowed per object.
  5. Parent field on child record is required. 
  6. Access to parent determines access to children. 
  7. If we Delete parent automatically deletes child. 
  8. One master detail relationship cannot be the parent of another. 
  9. Lookup field on page layout is required.

3. Many – to – Many relationship

Lookup and Master detail relationships are one to many relationships. 
We can also create many – to – Many relationship by using junction object. 
Junction object is a custom object with two master detail relationships.
Junction object can't be deleted if we are having rollupsummary fields.

No comments:

Post a Comment