Skip to main content

Hi All, 

How can we delete the test class from production but not the main class?

 

Thanks

5 Antworten
  1. 8. Juli 2022, 16:50

    I) Install the ANT Migration tool and connect to the production instance.  

     II) Then find the  trigger or class that you want to delete . 

     III) Retrive the matching trigger or class and change the XML status tag from Active to deleted.

    IV)And disable the trigger change it to inactivate.

    V)Save the file and zip the file like package.xml and destructivechanges.xml

    VI)Then deploy the production.

     

                   (or)

     

    1. Delete the Trigger in Sandbox
    2. Make a deployment package in Sandbox
    3. Add the Trigger which is going to be listed in RED now.
    4. Deploy and that deletes it from Production.

                                (or)

     

    Find and execute the file called antRun.bat. Since your username and password are already defined in the build.properties file, all you have to do is confirm that you want to delete. To those who are not on Windows, run the following command from the terminal window.

        ./ant/bin/ant/ -lib ./ remove