What do you need help with?

Error Code "sf:INVALID_OPERATION"

Follow

Error Code "sf:INVALID_OPERATION"

During deployment, you may run into a Salesforce error message:

{"name":"sf:INVALID_OPERATION","errorCode":"sf:INVALID_OPERATION"}

This is seen when deploying to the Production org under the following conditions:

Testing is done with "Do not run any tests" options.

Solution

When deploying on the Production org, you must use the following run tests option - use the option "Run local tests" or "Run all tests". The above error won't be seen with this test deployment option.

To skip running test classes in Production, please deploy with the option "Run Selected Test" and leave the test classes box empty. No tests will be run.

See also: sf:INVALID_OPERATION 

Print Friendly and PDF
Was this article helpful?
0 out of 0 found this helpful

Comments

  • Avatar
    Lauren Hanna

    Why do we have to run tests for simple field and workflow deployments???

  • Avatar
    Flosum

    Please chose the "Run Specified Test" option and use any test class to execute. Your deployment will complete only by running only one single test class. Please ensure that the code coverage for that specific test class is more than 75%.

  • Avatar
    Dan Wooding

    Could you add validation that it is a production instance and the run tests is not selected? It's a strange error message to get after it fails. If you could prompt users before clicking the deploy button then it would be so much cleaner to the user deploying changes.