0

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.

destructiveChanges.xml

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

package.xml

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

http://www.sf-ninjas.com/articles/6-quick-way-to-remove-apex-class-from-a-production-org

How to delete Apex class?

  • 1
    What selections or input are you making when you initiate the deployment in Workbench? – David Reed Feb 11 at 18:59
  • I have Rollback On Error and Single Package checked. I also have the RunLocalTests selected for the Test Level. – Justin Guay Feb 11 at 19:01
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.

| improve this answer | |
  • 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. – Justin Guay Feb 11 at 21:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.