3 answers
Hi Adda,please refer the below code : public class Sample { public Id Aid {get;set;} public list<article__c> lstArticles{get;set;} public set<Id> setCaseIDs = new set<Id>(); public Sample(ApexPages.StandardController controller) { Account acc = new Account(); Aid = controller.getId(); lstArticles = new list<articles__C>(); for(Case objCase : [Select Id from Case where AccountId = : Aid]) { SetCaseIds.add(objCase.Id); } for(Article__c objArticle : [Select Id, Name from Article__c where CaseId IN SetCaseIds]) { lstArticles.add(objArticle); } } }VF Page<apex:page standardController="Account" extension="Sample "> <table border="0" > <apex:repeat var="art" value="{!lstArticles}"> <tr> <td>{!art.Name}</td> </tr> </apex:repeat> </table></apex:page>You can query the data in your controller and then you can show them in Vf page as I shown above..Please correct synatx erros and check with above code that will solve your issue..P.S. If my answer helps you to solve your problem please mark it as best answer. It will help other to find best answer.Thanks,SandeepSalesforce Certified Developer