Struggling with deleting Apex Classes with Workbench. I've followed walkthroughs listed below, but I keep running into an "Invalid Parameter Value" error. The only parameter I can think of is the name of the Apex Class I'm putting in, but it seems correct to me.

Should this be working? Or should I be using a different method? (ANT, Eclipse IDE, SFDX CLI, etc.) This is my first time deleting Apex Classes in Production so I'm open to better ways or best practices. I'm currently trying to delete Apex Classes in Sandbox to test. I may be missing something. Please advise.


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">


<?xml version="1.0" encoding="UTF-8"?>
<Package xmlns="http://soap.sforce.com/2006/04/metadata">


How to delete Apex class?

  • 1
    What selections or input are you making when you initiate the deployment in Workbench?
    – David Reed
    Feb 11, 2020 at 18:59
  • I have Rollback On Error and Single Package checked. I also have the RunLocalTests selected for the Test Level. Feb 11, 2020 at 19:01

1 Answer 1


Generally speaking, as long as your ZIP format is correct, it should work. I've documented this process here. You can also use sfdx, Ant Migration Toolkit, etc. Common problems include case-sensitivity issues (the XML must be exactly right on case; it looks so there, but try copy-pasting from my previous answer), the ZIP file not having the correct format (if Single Package is enabled, XML files must be in the root, if not, should be in a nested folder), etc. There may be a problem with the Workbench. Invalid Parameter Value doesn't sound like a Salesforce-specific error. Again, try following my previous answer exactly and let me know what happens.

  • Thanks for your response. Unfortunately, I'm getting the same outcome with the same error after starting again from scratch using your answer. Is it possible the API version is the cause? That's the only difference I can see as I have 47.0, but it seems like Workbench is compatible with 48.0. I've matched API versions between Workbench and the XML which I think is enough. Feb 11, 2020 at 21:53

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .