Wednesday, May 11, 2016

Salesforce Interview Questions-Objects & Fields Part-3

11. What is difference between lookup and master details?
Look-up Master
•Up to 25 allowed per object
•Parent is not a required field
•No impact on security and access
•No impact on deletion
•Can be multiple layers deep
• Lookup field is not required
•Up to 2 allowed per objects.
•Parent field on child is required
•Access to parent determines access to children.
•Deleting parent automatically deletes children(cascade delete)
•Can only be multiple layers deep, the number depends on whether master object is a standard or custom object
•Lookup field on page layout is required.

12. What are roll up summary fields?
Rollup-summary fields are supported in master detail relationship. The parent object can use roll-up summary field type to perform operations of sum, maximum, minimum, count among its children records.

13. What is junction object?
Junction object is an object which has master detail relationship with 2 different objects. Many-to-Many relationships are implemented using two master detail objects. One Junction object is used as the child of the objects between which many-to-many relationship needs to be established.

14. What is difference between self-relationship and hierarchical relationship?
Self-relationship is a lookup relationship to itself. For example a case record can be related to parent case record.
When there is self-relationship exist on user object, then it is called hierarchical relationship. For example, an employee's manager is also an employee.

15. Can we change already existing lookup relationship between 2 objects to master detail relationship?
System will allow changing relationship to master-detail only if all child records have value specified for parent as in master detail relationship, master is required.
If any of the child value doesn’t have parent value (means look up field is blank), then system will give validation error while changing the data type.
So if it is required to change relationship, them populate all blank values with some parent value and then change it to master detail.


<<Objects & Fields Part-2                           Objects & Fields Part-4>>

1 comment: