[SalesForce] way to obtain a listing of Apex classes, triggers, and components by date

I'd like to be able to pull a listing of Apex classes, triggers, and components that have been created or modified after a certain date. Is there an easy way to do this?

Best Answer

If your aim is to do something manually as a once-off, you can use the "Query Editor" of the "Developer Console" to run these queries (adding where and order by as required):

Select a.SystemModstamp, a.Status, a.NamespacePrefix, a.Name,
        a.LengthWithoutComments, a.LastModifiedDate, a.LastModifiedById,
        a.IsValid, a.Id, a.CreatedDate, a.CreatedById, a.BodyCrc, a.Body,
        a.ApiVersion
From ApexClass a

Select a.UsageIsBulk, a.UsageBeforeUpdate, a.UsageBeforeInsert,
        a.UsageBeforeDelete, a.UsageAfterUpdate, a.UsageAfterUndelete,
        a.UsageAfterInsert, a.UsageAfterDelete, a.TableEnumOrId,
        a.SystemModstamp, a.Status, a.NamespacePrefix, a.Name,
        a.LengthWithoutComments, a.LastModifiedDate, a.LastModifiedById,
        a.IsValid, a.Id, a.CreatedDate, a.CreatedById, a.BodyCrc, a.Body,
        a.ApiVersion
From ApexTrigger a

for classes and triggers. But I don't think many/any other components are exposed in this way, so you will have to use the metadata API for a general solution.

Related Topic