You need to sign in to do that
Don't have an account?
Ravi Dendhi 10
SOQL query to fetch multiple objects and display records in VF pages
Hi I am trying to fetch multiple objects and their records with the Task to display on VF pages. I know I can achive this using SOSL but we provide managed packages for the users so I cannot go with SOSL as it needs maintanence. I tried using SOQL but can only query one object at a time the query is Dynamic SOQL. Instead can I write the Dynamic SOQL query in For loop to achive this. Suggestions please. thanks
If you want to combine two different objects in a single table and display in a visual force page then use Wrapper class to combine two objects and display in your visual force page. Check this sample post to get start
https://www.interactiveties.com/blog/2012/visualforce-wrapper-class.php
http://bobbuzzard.blogspot.co.uk/2010/09/rotating-visualforce-table.html
https://developer.salesforce.com/page/Wrapper_Class
Kindly mark it as solved if it helps you,
Best Regards,
Rakesh.T
1.) Try relationship queries.
2.) it relationship queries dont help, you should be doing SOQL1 and loop over these results to collect any values that are required for SOQL2. for example