Skip to content

Instantly share code, notes, and snippets.

@tyoshikawa1106
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tyoshikawa1106/385d4141c518641204c8 to your computer and use it in GitHub Desktop.
Save tyoshikawa1106/385d4141c518641204c8 to your computer and use it in GitHub Desktop.
<apex:page controller="RelatedListDemoController">
<apex:repeat value="{!accounts}" var ="item">
<apex:relatedList list="Contacts" subject="{!item.Id}" />
</apex:repeat>
</apex:page>
public class RelatedListDemoController{
public List<Account> accounts {get; set;}
public RelatedListDemoController() {
this.accounts = [SELECT Id FROM Account ORDER BY Name ASC LIMIT 5];
}
}
@tyoshikawa1106
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment