In one of our article we have discussed how to fetch all custom objects in apex . Today we will learn how to get all Custom and Standard Objects .
You know that using Schema.getGlobalDescribe() we can fetch all properties of sObject. We have already used Schema class to fetch all Standard objects , record types from object , to find all required fields on Object and so on .
Get all Standard and Custom Objects
for(Schema.sObjectType info : Schema.getGlobalDescribe().values()) {
Schema.DescribeSObjectResult describedInfo = info.getDescribe();
String objectName = describedInfo.getLocalName();
System.debug('Object Name '+objectName );
}
The given approach will return all Objects available on Salesforce org . Where some objects are