You need to sign in to do that
Don't have an account?
tanmayee
Apex class to pull the name of all the objects from a salesforce account
I want to write an apex class to pull the name of all the objects (both standard as well as custom) from a salesforce account and display the same in a VF page. Any help would be highly appreciated.
you could start with something like this
Map<String, Schema.SObjectType> objList = Schema.getGlobalDescribe();
for (String objName:objList.keyset()){
//Use the value
system.debug(objName);
}
You can use the SObject Describe method to do this per AdminBoosters post above.
I wrote an article about using this with Visualforce a while back as an example. You could reusue some of the code I have there to solve our problem.
http://corycowgill.blogspot.com/2011/01/building-dynamic-soql-select-all-query.html