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
sfdc trailhead 6sfdc trailhead 6 

how to add related list records to field

AnudeepAnudeep (Salesforce Developers) 
Can you describe more about what you are trying to achieve?

If you want to add fields to the related list
  • Navigate to the Page Layout that you wish to add fields to a Related List for. You can access the Page Layout via the Setup menu or the Edit Layout on the object itself. 
  • Once you are on the edit screen of the Page Layout, navigate to the Related List that you wish to adjust the number of fields for. Select the wrench icon beside the Related List and add your fields
Anudeep
sfdc trailhead 6sfdc trailhead 6
I want to show related list records in parent object field
AnudeepAnudeep (Salesforce Developers) 
You can fire a relationship query which will give you all the detail(related list records) records for each of the master record and use VF page to create a section to display the records. You have to then add the results of the query to a text field, unsure how this can be done

Query looks like this 
 
List<Master__c> ListOFMasterRecords = new list<Master__c>([select id (select id from Detail__r)from Master__c]);

See this example for reference

Anudeep