You need to sign in to do that
Don't have an account?
Fippy
How can I find if/where classes are being used?
Hello,
having inherited a huge custom code SF installation, I am trying to prune unused code from production. Is there an easy way to determine if or where an Apex class or VF Page is being used?
Thanks,
Graeme
You can search for the Apex class/page in the IDE, the Search result will show all the matches where the class/page/trigger is referenced. Hope this helps.
Definitely an option, albeit a painful one. :) I was hoping there would be something in Salesforce itself that could report on usage and even identify unused pages/classes?
You can check the Dependency button on top of apex class/page. That will show the dependency of a particular class.
I'll look into that, but it looks like it operates backwards from what I want, i.e. it tells me what the current class references, as opposed to "places where THIS is referenced". I can use it, but with the amount of code we have it will take a while.
It would be nice if SF gave us both dependency lists. Our own product has a "places where this is used" option, and we know if it's blank, it's not referenced anywhere in our platform.
Thanks,
Graeme
I know this is an old thread, but I just had the need to find where a specific method/class was being used. Using the Force.com IDE (eclipse) I was able to search all the apex in my org for a specific class/ method.
This allowed me to search all apex code. I hope this helps.
One could add a "breadcrumb" custom object, and create a breadcrumb record in each class' constructor method, but even that would only show that the class hasn't been used for a time, not that it is unused altogether. For instance, maybe it would be executed in a scheduled job job that runs annually.