Create visualforce page to retrieve data from multiple custom objects using custom controller wrapper class and display data in a table of VF page in Salesforce | how to fetch data from multiple different object in visualforce page
Hey guys, today in this post we are going to learn about how to retrieve data from multiple custom objects using custom controller wrapper class and display data in a table of VF page in Salesforce.
Files we used in this post example
myWrapperClassCustomObjVfp.vfp
Visualforce Page
It is used to Create VF page to retrieve data from multiple objects and display data in table.
customPathStatusCtrl.apxc
Apex Class Controller
It is used to retrieve data from multiple custom objects using custom controller wrapper class.
Custom Object
carModel__c:- Name,car_model_master_rel__r.First_Name__c
truckModel__c:- Name, brand__c, color__c, company__r.Name
Custom Object and their fields
Fetching data from multiple different custom object in one page using custom controller
Final Output → To get source code live demo..

Other related post that would you like to learn in LWC
Create Visualforce Page
Step 1:- Create Visualforce Page : myWrapperClassCustomObjVfp.vfp
From Developer Console >> File >> New >> Visualforce Page
myWrapperClassCustomObjVfp.vfp [ Visualforce Page]
Create Apex Class Controller
Step 2:- Create Apex Class : myWrapperCustomObjCtr.apxc
From Developer Console >> File >> New >> Apex Class
myWrapperCustomObjCtr.apxc [Apex Class Controller]

Further post that would you like to learn in LWC FAQ (Frequently Asked Questions)
What is retrieve in Salesforce?
Use the retrieve() call to retrieve individual records from an object. The client application passes the list of fields to retrieve, the object, and an array of record IDs to retrieve. The retrieve() call does not return records that have been deleted.
How do I recover a deleted record in Salesforce?
Login to Workbench using your Salesforce credentials and select the queries drop-down | SOQL Query. Select the object that contains the records to be restored. Select Include under List and for Deleted and archived records.
What are retrieve and deploy in Salesforce?
Use the deploy() and retrieve() calls to move metadata (XML files) between a Salesforce organization and a local file system. At any time you can deploy those changes to another Salesforce organization.
Final Output → To get source code live demo..
Hi, This is Vijay Kumar behind the admin and founder of w3web.net. I am a senior software developer and working in MNC company from more than 8 years. I am great fan of technology, configuration, customization & development. Apart of this, I love to write about Blogging in spare time, Working on Mobile & Web application development, Salesforce lightning, Salesforce LWC and Salesforce Integration development in full time. [Read full bio] | | The Sitemap where you can find all published post on w3web.net
Originally published at https://www.w3web.net on May 25, 2021.