You need to sign in to do that
Don't have an account?
kavya.ax1320
List out only standard object and Custom object using describe function
Hi,
Is there a possibility to list out only Standard and Custom objects from the instance using the Schema.describe function.
Thanks in advance.
for(Schema.SObjectType f : gd) {
System.debug(' ---' + f.getDescribe().getLabel() );
}
List<Schema.SObjectType> gd = Schema.getGlobalDescribe().Values();
for(Schema.SObjectType f : gd) {
if( !f.getDescribe().getName().endsWith('__c') ) {
System.debug(' ---' + f.getDescribe().getLabel() );
}
}
This solution is of course correct, but if you wanted something similar in a single code block, with some additional useful information:
Good luck!