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

How2get all objects dynamically nd place on VF Page.search4record in those obj nd display

Hi All,

This is Ramana,we have an urgent requirement but unable to find the solution.


We need to place all sObjects on visualforce page dynamically along with checkboxes for each object.


Then after if we search for a record on the same page that should display the records in section wise.(for example if the record found in the account that should come under account section).


Any kind of help will be greatly appreciated.


Thanks in advance



hi Ramana.r.sf,


you can able to get all the sObjects using a single line of code using the Map<> and return it to the VF Page and display it in a pageBlockTable. While binding the Map in the pageBlockTable, u have to create a column with the Checkbox and in second column, u have to bind the values of the Map<> variable..


The Line of code to retrieve the sObjects is


Map<string, Schema.sObjectType> m = Schema.getGlobalDescribe();


This code will return all the sObjects and all the custom objects created in your Org. I cant able to get your full requirement which you have asked about the searching thingies and all.. 


Mark as answer if you find this post was helpful for you..




Andy BoettcherAndy Boettcher

How is what you're building different from Global Search?