function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Jeffrey BrochsteinJeffrey Brochstein 

Listing of all Apex class in a given Org

Hi there  - Is it possible to view an entire list of all APEX classes for a given org without having to keep clicking on the 'next page' or 'show more' link. I notice that it maxs out at 1000 records when clicking either of these links, which presents an issue if the org has more than 1000 APEX class records and one is trying to document an entire listing of what is there.

Thanks - Jeff
Best Answer chosen by Jeffrey Brochstein
Martijn SchwarzerMartijn Schwarzer
Hi Jeffrey,

I'm not sure what your requirements are, but you can create a SOQL Query to get the information you need. You will need to query the ApexClass object like this:
 
List<ApexClass> classes = [select ApiVersion, Body, BodyCrc, CreatedById, CreatedDate, Id, IsValid, LastModifiedById, LastModifiedDate, LengthWithoutComments, Name, NamespacePrefix, Status, SystemModstamp from ApexClass LIMIT 10000];
Hope this helps!

Best regards,
Martijn Schwärzer
 

All Answers

Martijn SchwarzerMartijn Schwarzer
Hi Jeffrey,

I'm not sure what your requirements are, but you can create a SOQL Query to get the information you need. You will need to query the ApexClass object like this:
 
List<ApexClass> classes = [select ApiVersion, Body, BodyCrc, CreatedById, CreatedDate, Id, IsValid, LastModifiedById, LastModifiedDate, LengthWithoutComments, Name, NamespacePrefix, Status, SystemModstamp from ApexClass LIMIT 10000];
Hope this helps!

Best regards,
Martijn Schwärzer
 
This was selected as the best answer
Jeffrey BrochsteinJeffrey Brochstein
Martin - Thanks...I am seeing similar suggestions when searching on the matter.

Jeff
Boris Levchets 14Boris Levchets 14
Here is a simple guide to creating a VF page that looks up an object (by text) in all apex classes and provides a full list to you

https://abaav.com/create-visualforce-page-to-show-dependencies-of-any-classes-objects-in-an-organization/
prakher jain 10prakher jain 10
I wanted to know how to write test class to cover this query