apex code - Query to search list of sObjects in the Organization -


i trying build visualforce page want display sobjects in system related data counts in tabular format.

objectname objectlabel recordcount

can know how can query list of sobjects , display in page.

here's example piece of code fetch list of objects (and in case add them picklist).

public class objectlist{   public string val {get;set;}      public list<selectoption> getname()     {       list<schema.sobjecttype> gd = schema.getglobaldescribe().values();            list<selectoption> options = new list<selectoption>();        for(schema.sobjecttype f : gd)       {         options.add(new selectoption(f.getdescribe().getlabel(),f.getdescribe().getlabel()));       }       return options;     } } 

as cannot predict number of objects, can't use standard tabpanel markup have use dynamic visualforce. documentation on using tabs in dynamic vf here

however, why go tabs? why not display complete result set on 1 page? save hassle dynamic visualforce components (which not easy use).


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -