Apex - How can use identify Apex classes that haven't been executed for a while

1.2k Views Asked by At

I am looking for a way to identity Apex classes/VF Pages that haven't been used for a while to clean up. Any potential ideas are welcome.

1

There are 1 best solutions below

0
वरुण On

You can check by LastModifiedDate field on apex class, to check which are not touched for a while(most probably not being used).

Use this SOQL:

SELECT Name, LastModifiedDate FROM ApexClass ORDER BY LastModifiedDate DESC

On the result on above query you can analyze if you need that class or not.

For VisualForce pages, you can use the below SOQL:

SELECT Name, LastModifiedDate FROM ApexPage ORDER BY LastModifiedDate DESC