You need to sign in to do that
Don't have an account?
Jenni at Jack
Delete Visualforce page & associated Apex class
Hi, I have a VF page & referenced apex class that I need to delete that are no longer used & because of the lack of coverage are preventing me from deploying a trigger & class that I need from my sandbox. I received a Success message when I followed the instructions to delete the apex class from my production org using Force.com IDE however I discovered the apex class is still there since it’s tied to a VF page. Is it safe to delete the VF page & then delete the apex class using IDE once the VF page is gone? Let me know if it’s helpful to post code to answer the question, the apex class was created 3+ years ago by our implementation consultant with 1200+ lines.
Then go to visualforce page and delete it. If it also have reference somewhere than you need to remove the refrence.
If the reference is in the class making it cyclic referecne then. Remove all code of the VFP and remove the controller="YourClassName" attribute from the <apex:page tag.
Once you remove code of page you can then delete the Class first and then the VFP.
All Answers
Then go to visualforce page and delete it. If it also have reference somewhere than you need to remove the refrence.
If the reference is in the class making it cyclic referecne then. Remove all code of the VFP and remove the controller="YourClassName" attribute from the <apex:page tag.
Once you remove code of page you can then delete the Class first and then the VFP.