Hi,
please, i need to know if there are any solutions for deleting an apex class from production environment.
We deleted a class from sandbox but in production we are not able to do it from admin browser.
At tjis moment, we are not able to deploy one of change set on Prod because the class unused is failing at validation tests.
#Sales Cloud #Service Cloud #Trailhead #Integration
I read that exists a solution by using workbench. But SF does not support this tyupe of solution.
I do not believe the previous answer will work, that would only update the listed classes, not explicitly delete the ones that are missing (because you can deploy in parts).
The deployment method is to use the destructive changes mechanism, where you create a file that looks like the deployment file (listing what to deploy) but instead name it destructiveChanges.xml (instead of package.xml). Then deploy as usual and it will delete the listed elements (assuming there are no dependency violations).
Full documentation is here: https://developer.salesforce.com/docs/atlas.en-us.api_meta.meta/api_meta/meta_deploy_deleting_files.htm