We have mainly two types of relationships
1. Lookup relationship
2. Master detail relationship
1. Lookup relationship:-
2. Master detail relationship:-
1. Lookup relationship
2. Master detail relationship
1. Lookup relationship:-
- Up to 25 allowed per object
- parent is not a required field
- No impact on security and access
- No impact on deletion of parent
2. Master detail relationship:-
- Master Detail relationship is nothing but Parent child relationship.
- Master represents Parent and detail represents Child.
- If Parent is deleted then Child also gets deleted.
- 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.
- Parent field on child record is required.
- Access to parent determines access to children.
- If we Delete parent automatically deletes child.
- One master detail relationship cannot be the parent of another.
- 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