You need to sign in to do that
Don't have an account?
Code explanation
Dear All,
Could somone please tell me if the code I have explained is correct and detailed enough?? From reading the description does the code make sense. If you could add to it I would really appreciate.
public List<SelectOption> getObjectValues(){
List<SelectOption> optionList = new List<SelectOption>();
optionList.add(new SelectOption('None' ,'None'));
List<String> entities = new List<String>(schemaMap.keySet());
entities.sort();
for(String eachobj: entities){
optionList.add(new SelectOption(eachobj ,eachobj));
} return optionList;
To get object values a select option method was written. The schema map gets all schema objects. This is then added into the option list. Each object was added where the entities came from the schema map and then all objects came into the option list. Finally the option list was returned to see the objects on the VF page.
Thanks
Aniqa
Hi,
Try below code to get list of object from your org,
Hope this helps :)