I am working in sandbox. I have class with name XXX now i edit and re-name as YYY. I am moving this to prod.While i tested in dev. Surprised both class Ids are same. I wasn't tested in prod(dont have access).

My question is.

Will it happen to prod as like dev. There wont be any deletion on XXX but the class will be replaced with new name ? Please suggest.

  • Yes, I am not sure about the Id's but definitely there will be a new class with the name YYY and class XX will not be deleted. – C. Praveenkumar Oct 28 '16 at 6:48
  • Do you want to delete the XXX in production? I am sorry, didn't fully understand your question. – Mahmood Oct 28 '16 at 6:48
  • no.. i replaced old name with new name. I am trying to deploy the file to prod. will it have two different version in prod(both x and y file ) exist ? or one file with new name. – bharath Oct 28 '16 at 6:51
  • Thanks Praveen. So i should delete XXX from prod right ? – bharath Oct 28 '16 at 6:52
  • Today i renamed one file and requested delete the old file. Both changeset are point same file in prod. (OMG) . – bharath Nov 4 '16 at 7:13

To delete a class:

Use IDE to create a new project and download all classes from production In the class you want to delete, open the metadata file and change the status of the class to "deleted" Save to server Observe the status of the class in the example below:

<?xml version="1.0" encoding="UTF-8"?>
 <ApexClass xmlns="http://soap.sforce.com/2009/07/metadata">

Please try this technique in sandbox and become comfortable with it before attempting in production. Double-check the class name before deleting.

Reference : https://help.salesforce.com/apex/HTViewSolution?id=000006188

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.