You need to sign in to do that
Don't have an account?
sahiti@sfdc
How to determine which is parent object and which is child object in lookup relationship?
Please explain with an example.
function readOnly(count){ }
You need to sign in to do that
Don't have an account?
Hi Sahiti,
Hope you are doing good.
Parent object and child object in the lookup relationship are determined purely on the requirement.
Example: The object which has the more number of records will be the parent object and the object which has fewer records is considered as the child object. The reason is parent object has the data and the child object will have the lookup field which will refer those data. Hence whichever object you create a lookup field will be the child object and the data which it refers to is considered as the parent object.
Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
All Answers
Hi Sahiti,
Hope you are doing good.
Parent object and child object in the lookup relationship are determined purely on the requirement.
Example: The object which has the more number of records will be the parent object and the object which has fewer records is considered as the child object. The reason is parent object has the data and the child object will have the lookup field which will refer those data. Hence whichever object you create a lookup field will be the child object and the data which it refers to is considered as the parent object.
Hope this helps.
Kindly mark this as solved if the reply was helpful.
Thanks,
Nagendra
+ Nagendra,
Lookup relationship of parent and child object depends upon the business scenarios. In a lookup relationship between the parent object and child object are loosely coupled i.e. they are independent to each other. Forex: There is a Project(parent) object which has a lookup of Employee(child). If the project is completed then the employee will be still present to work on other projects. Most commonly the parent has less number of records as compared to child records.
Please go through these links for better understanding:
https://trailhead.salesforce.com/en/modules/data_modeling/units/object_relationships
https://developer.salesforce.com/docs/atlas.en-us.soql_sosl.meta/soql_sosl/sforce_api_calls_soql_relationships_and_custom_objects.htm
Thank you,
Ajay Dubedi