+ Start a Discussion
Rohan TelangRohan Telang 

Hi developers, I am new to Salesforce ..I need help in one scenario

When i enter "Policy Holder ID" and click on "Submit" then below result should appear.
There is one primary object i.e  "Policy_Holder__c"
and two secondary objects  i.e "Life_Insurance__c" and "Motor_Insurance__c" ...

"Policy_Holder__c" object contains "Policy Holder ID" field.

"Life_Insurance__c" object contains Policy ID,Policy Type,Premium Amount, Due Date fields.

"Motor_Insurance__c" object contains Policy ID,Policy Type,Premium Amount, Due Date fields.

So when i enter Policy Holder ID then below fields should be retrieved of related list in "Visual Force page"

User-added image

 
ANUTEJANUTEJ (Salesforce Developers) 
Hi Rohan,

Can you mention if the objects are related and if they have a lookup relationship files? and I think it might be better to have a lightning component instead of a visualforce page if the use case as per my understanding is to have other fields populated as per the parent record, if that is right then try checking the lightning component.

I hope this helps and in case if this comes handy can you please choose this as the best answer so that it can be useful for others in the future.


Regards,
Anutej 
Rohan TelangRohan Telang
Hi Sir,
I have learnt visualforce programming and apex programming...I don't know Lightning component..Please can you tell me for Visual force page.
Yes objects are related.....
"Policy_Holder__c" object is Primary object. i.e Parent object.

"Life_Insurance__c" object is Secondary object i.e Child object. Life_Insurance__c  is in lookup relation with "Policy_Holder__c"  object.
The Child Relationship Name is "Life_Insurances__r" for "Policy_Holder__c" "Life_Insurance__c"

"Motor_Insurance__c" is also Secondary object i.e Child object. "Motor_Insurance__c"  is in lookup relation with "Policy_Holder__c"  object.
 The Child Relationship Name is "Motor_Insurances__r" for "Policy_Holder__c" "Motor_Insurance__c"