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
ECoronaECorona 

Visualforce display subquery columns

Hi ! I have this query
 
SELECT Id, Name, (SELECT Proveedores__c FROM Proveedores__r), (select name from opportunities where createddate =this_year and stagename='Ganada') FROM Account
where id in (SELECT Cuenta__c FROM Proveedores__c)
and id in (select accountid from opportunity where createddate =this_year and stagename='Ganada')    

But now i'm stuck in how i can show all the Account Name, the Proveedores__c columns and the Opportunity name in a visualforce page

I'll really appreciate your help!!!
ManojjenaManojjena
Hi Ecorona,

Here you need to create wrapper class .You need to create wrapper list gettter Setter to display in Vf page . Also one thing here you need to keep in mind that your opportunity and Proveedores__c records may differ in size .opportunity and Proveedores__c  will be more then one for one account .So cases wil come where Account Name wil repeat and if Opportunity and Proveedores__c size wil very then the column will be blank .

Let me know if it helps !!
Thanks
Manoj
 
ECoronaECorona
Manojj! thank you so much, I'll try with the wrapper class