+ Start a Discussion
Rabbani sayyed 8Rabbani sayyed 8 

I have two custom objects namely student and training here training is a master object in master detail relationship. i want to display the related list of student (child)object in master object by using visualforce pages.Can anyone of you help me on this

I have two custom objects namely student and training here training is a master object in master detail relationship. i want to display the related list of student (child)object in master object by using visualforce pages.Can anyone of you help me on this
Balaji Chowdary GarapatiBalaji Chowdary Garapati
@Rabbani sayyed 8:

 You can use <apex:relatedList> tag to display the child objects, for reference take a look at below link:

http://www.salesforce.com/docs/developer/pages/Content/pages_compref_relatedList.htm

if you are trying to filter/change the order/do any other functionality other than related list, you need to query the child records and display them in your custom style.

Thanks,
balaji
Samba Gao 6Samba Gao 6
Hi Rabbani,

Why do you want to use a Visualforce page? You can add the related list of student to traning detail page using page layout.

Thanks,
Samba
Rabbani sayyed 8Rabbani sayyed 8

Hi Samba
Yes, as you said i can achieve the above synario by using the pagelayout concept but i just wanted to know that if i have reqirement to achieve that synario by using only with visualforce pages then how can achieve this . can you helip me on this.
Samba Gao 6Samba Gao 6
I am collecting client requirements. Could you please tell me why you do want to do? Salesforce certified developer Samba Gao