function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Sara Massey 10Sara Massey 10 

I would like to pull up a list of all child objects under a specific parent record. Similar to a related list, but I need to be able to edit multiple fields on the records but would prefer not to use

I would like to pull up a list of all child objects under a specific parent record.  Similar to a related list, but I need to  be able to edit multiple fields on the records but would prefer not to use  inline edit support and have to double click each cell.  Would much prefer to have all fields already in inputField format ready for a value (either first time entering a value or editing an existing value).  So far, I cannot find a way to do this.  I see how i can use a list controller to pull up and edit multiple records, but I cannot filter for only a subset of those records (with same parent record).  I can use a custom controller and extension to pull up the exact list I need, but then I Cannot use standard methods like 'save' and 'edit' in order to ensure the update is made on each field.  Any suggestions?
                                          
Best Answer chosen by Sara Massey 10
ShirishaShirisha (Salesforce Developers) 
Hi Sara,

Greetings!

You can use the Standard controller and extension in which you can query the child records based on the parent Id and use the standard Save and Edit button as well without using any other extra code.

Please find the sample code provided in the below documentations:

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

https://www.tutorialkart.com/visualforce/controller-extension-in-salesforce/

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri

All Answers

ShirishaShirisha (Salesforce Developers) 
Hi Sara,

Greetings!

You can use the Standard controller and extension in which you can query the child records based on the parent Id and use the standard Save and Edit button as well without using any other extra code.

Please find the sample code provided in the below documentations:

https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_controller_extension.htm

https://www.tutorialkart.com/visualforce/controller-extension-in-salesforce/

Kindly let me know if it helps you and close your query by marking it as best answer so that it can help others in the future.

Warm Regards,
Shirisha Pathuri
This was selected as the best answer
Sara Massey 10Sara Massey 10
Shirisha Pathuri - thank you so much for the follow up and the information!  Before I review everything, I also wanted to be sure that I used the correct terminology.  I said Parent / Child when in actuality ths is a master detail relationship between two custom objects.  Will using a standard Controller and extension still be a good route to take?  
Thanks!
Sara
 
ShirishaShirisha (Salesforce Developers) 
Hi Sara,

Thank you for reaching out again.

The difference between the lookup and Master detailed relationship is that the child records are completely controlled by the Parent record.

So,I would suggest you to try the suggested approach to proceed further.

Warm Regards,
Shirisha Pathuri
Sara Massey 10Sara Massey 10
I will.. thank  you again so much! 
Sara Massey 10Sara Massey 10
Thank you Shirisha!  This was exactly what I needed.  I was able to create a list of the 'child' object under a unique 'parent' object and also use the standard action methods to save input the user enters into the inputfield on the VF page.  I really appreciate your help. Sara